]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8754 Don't try IPv6 addresses unless configured to
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 13 Jun 2019 08:24:43 +0000 (10:24 +0200)
committerOndřej Kuzník <ondra@mistotebe.net>
Thu, 13 Jun 2019 08:24:43 +0000 (10:24 +0200)
libraries/libldap/os-ip.c

index 47cefe77c9fd72ce589a780877c165e36e3a81ba..60f81a788c04219681853f6d010342971748eb46 100644 (file)
@@ -611,6 +611,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 ) {