Issue 8754 - ldpasearch IPv5 only
Summary: ldpasearch IPv5 only
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.45
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-11 12:24 UTC by dpa-openldap@aegee.org
Modified: 2019-07-24 19:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dpa-openldap@aegee.org 2017-10-11 12:24:55 UTC
Full_Name: Дилян Палаузов
Version: 2.4.45
OS: Linux
URL: 
Submission from: (NULL) (87.193.154.82)


After `./configure --disable-ipv6` I expect, that `ldapsearch` will not contact
severs over IPv6, which is achieved with the fix below.

diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c
--- a/libraries/libldap/os-ip.c
+++ b/libraries/libldap/os-ip.c
@@ -623,6 +623,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 ) {
Comment 1 Quanah Gibson-Mount 2017-10-19 17:06:11 UTC
changed notes
Comment 2 Quanah Gibson-Mount 2019-06-13 18:44:31 UTC
changed notes
changed state Open to Release
moved from Incoming to Software Bugs
Comment 3 Ondřej Kuzník 2019-06-14 10:39:33 UTC
On Wed, Oct 11, 2017 at 12:24:56PM +0000, dpa-openldap@aegee.org wrote:
> After `./configure --disable-ipv6` I expect, that `ldapsearch` will not contact
> severs over IPv6, which is achieved with the fix below.

Hi,
thank you for your work, the patch has been pushed to master
(5e8aa3f6d111160cbb3ce3a49af7323258e702b5) and will also be part
(c4f55cea87880ca8c14b559bd77bcea19ad615cd) of the upcoming 2.4.48
release.

Thanks,

-- 
Ondřej Kuzník
Senior Software Engineer
Symas Corporation                       http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP

Comment 4 OpenLDAP project 2019-07-24 19:00:54 UTC
Fixed in master
Fixed in RE24 (2.4.48)
Comment 5 Quanah Gibson-Mount 2019-07-24 19:00:54 UTC
changed notes
changed state Release to Closed