diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-12-01 23:12:29 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-12-01 23:12:29 +0100 |
commit | b58490c558fa16197c22354c892293bd6e527ce8 (patch) | |
tree | 09d8e29ee4355a22552022bc5099e6bd3ff0ad44 /src | |
parent | 414903e3732bd6baa3dd0306fe79fd0d9901143f (diff) |
ask for ipv4 addresses only in getaddrinfo() if ipv6 is disabled
This speeds up dns requests quite a bit in my setup.
Diffstat (limited to 'src')
-rw-r--r-- | src/dns.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -284,7 +284,11 @@ static void *Dns_server(void *data) char addr_string[40]; memset(&hints, 0, sizeof(hints)); +#ifdef ENABLE_IPV6 hints.ai_family = AF_UNSPEC; +#else + hints.ai_family = AF_INET; +#endif hints.ai_socktype = SOCK_STREAM; hosts = dList_new(2); |