From 6c08d96597d120bc0dffeb49fb7fa556d51ea89e Mon Sep 17 00:00:00 2001 From: Stig Venaas Date: Wed, 29 Oct 2003 14:49:35 +0000 Subject: [PATCH] use AI_ADDRCONFIG if possible to not lookup AAAA when no IPv6 addresses are configured --- libraries/libldap/os-ip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 57195918db..af0c2c8270 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -371,6 +371,9 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb, #if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP ) memset( &hints, '\0', sizeof(hints) ); +#ifdef AI_ADDRCONFIG + hints.ai_flags = AI_ADDRCONFIG; +#endif hints.ai_family = ldap_int_inet4or6; hints.ai_socktype = socktype; snprintf(serv, sizeof serv, "%d", port ); -- 2.39.5