2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

1219. [bug] Set AI_ADDRCONFIG when looking up addresses

via getaddrinfo() (affects dig, host, nslookup, rndc
                        and nsupdate).
This commit is contained in:
Mark Andrews
2002-06-06 00:27:37 +00:00
parent 9b7c023fe6
commit c3184b4e2a
2 changed files with 8 additions and 2 deletions

View File

@@ -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.

View 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) {