From: Stig Venaas Date: Wed, 29 Oct 2003 14:49:35 +0000 (+0000) Subject: use AI_ADDRCONFIG if possible to not lookup AAAA when no IPv6 addresses are configured X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~477 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c08d96597d120bc0dffeb49fb7fa556d51ea89e;p=openldap use AI_ADDRCONFIG if possible to not lookup AAAA when no IPv6 addresses are configured --- 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 );