]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1219. [bug] Set AI_ADDRCONFIG when looking up addresses
authorMark Andrews <marka@isc.org>
Thu, 6 Jun 2002 00:27:37 +0000 (00:27 +0000)
committerMark Andrews <marka@isc.org>
Thu, 6 Jun 2002 00:27:37 +0000 (00:27 +0000)
                        via getaddrinfo() (affects dig, host, nslookup, rndc
                        and nsupdate).

CHANGES
lib/bind9/getaddresses.c

diff --git a/CHANGES b/CHANGES
index 749840b8b5434f72bc497c546b8f78e0fc60426f..6eb240e8e668e7a308984f0b923a51027f44a01f 100644 (file)
--- 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.
index 32df5566b3d2acccfa9f583bf882546d222c4ad6..10c1f7f08bd9b6fbb4e72b8eab84fb828c6dcab3 100644 (file)
@@ -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 <config.h>
 #include <string.h>
@@ -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) {