]> git.sur5r.net Git - openldap/commitdiff
use AI_ADDRCONFIG if possible to not lookup AAAA when no IPv6 addresses are configured
authorStig Venaas <venaas@openldap.org>
Wed, 29 Oct 2003 14:49:35 +0000 (14:49 +0000)
committerStig Venaas <venaas@openldap.org>
Wed, 29 Oct 2003 14:49:35 +0000 (14:49 +0000)
libraries/libldap/os-ip.c

index 57195918db1ef1a4f12fa1161cd68ada0155658a..af0c2c827033e7f877337ab8e7ab8f4e7f4ff751 100644 (file)
@@ -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 );