mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
use AI_ADDRCONFIG if possible to not lookup AAAA when no IPv6 addresses are configured
This commit is contained in:
parent
5ed0318b79
commit
6c08d96597
1 changed files with 3 additions and 0 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue