From: Ondřej Kuzník Date: Thu, 13 Jun 2019 08:24:43 +0000 (+0200) Subject: ITS#8754 Don't try IPv6 addresses unless configured to X-Git-Tag: OPENLDAP_REL_ENG_2_4_48~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f55cea87880ca8c14b559bd77bcea19ad615cd;p=thirdparty%2Fopenldap.git ITS#8754 Don't try IPv6 addresses unless configured to --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index e5b358c5fb..d48e28caa6 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -622,6 +622,9 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb, continue; } +#ifndef LDAP_PF_INET6 + if ( sai->ai_family == AF_INET6 ) continue; +#endif /* we assume AF_x and PF_x are equal for all x */ s = ldap_int_socket( ld, sai->ai_family, socktype ); if ( s == AC_SOCKET_INVALID ) {