diff --git a/CHANGES b/CHANGES index 749840b8b5..6eb240e8e6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1219. [bug] Set AI_ADDRCONFIG when looking up addresses + via getaddrinfo() (affects dig, host, nslookup, rndc + and nsupdate). + 1218. [bug] The CINCLUDES macro in lib/dns/sec/dst/Makefile could be left with a trailing "\" after configure has been run. diff --git a/lib/bind9/getaddresses.c b/lib/bind9/getaddresses.c index 32df5566b3..10c1f7f08b 100644 --- a/lib/bind9/getaddresses.c +++ b/lib/bind9/getaddresses.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getaddresses.c,v 1.9 2001/11/16 06:48:22 bwelling Exp $ */ +/* $Id: getaddresses.c,v 1.10 2002/06/06 00:27:37 marka Exp $ */ #include #include @@ -87,8 +87,10 @@ bind9_getaddresses(const char *hostname, in_port_t port, hints.ai_family = PF_INET; else if (!have_ipv4) hints.ai_family = PF_INET6; - else + else { hints.ai_family = PF_UNSPEC; + hints.ai_flags = AI_ADDRCONFIG; + } hints.ai_socktype = SOCK_STREAM; result = getaddrinfo(hostname, NULL, &hints, &ai); switch (result) {