Bug 11281 - IPv6 ADS LDAP Client connects fail. LDAP URL format in code is wrong.
Summary: IPv6 ADS LDAP Client connects fail. LDAP URL format in code is wrong.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: unspecified
Hardware: All All
: P5 major (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-20 16:05 UTC by David Holder
Modified: 2015-06-06 20:06 UTC (History)
1 user (show)

See Also:


Attachments
Patch: adds IPv6 support to ADS client side LDAP connects (1.11 KB, patch)
2015-05-20 16:05 UTC, David Holder
no flags Details
git-am fix for 4.2.next. (1.33 KB, patch)
2015-05-27 18:13 UTC, Jeremy Allison
slow: review+
Details
git-am fix for 4.1.next. (1.31 KB, patch)
2015-05-27 18:14 UTC, Jeremy Allison
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Holder 2015-05-20 16:05:39 UTC
Created attachment 11071 [details]
Patch: adds IPv6 support to ADS client side LDAP connects

The attached patch fixes a bug in Samba whereby client ADS LDAP
connections fail to IPv6-only DCs.

The fault was that the code assumed that a URI containing a literal
IPv6 address has the same format as a URI containing a literal IPv4
address in it. This assumption is wrong. For IPv6 URIs, the address
must be enclosed in square brackets.

E.g:

ldap://192.168.1.1
ldap://[2045::1]

This fault breaks a number of things including IPv6-only member servers attempting to join an AD domain.

Reviewed patch attached.
Comment 1 Jeremy Allison 2015-05-27 18:13:55 UTC
Created attachment 11093 [details]
git-am fix for 4.2.next.
Comment 2 Jeremy Allison 2015-05-27 18:14:16 UTC
Created attachment 11094 [details]
git-am fix for 4.1.next.
Comment 3 Jeremy Allison 2015-05-27 21:28:21 UTC
Re-assigning to Karolin for inclusion in 4.2.next, 4.1.next.
Comment 4 Karolin Seeger 2015-06-01 19:17:21 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-[1|2]-test.
Comment 5 Karolin Seeger 2015-06-06 20:06:14 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to both branches.
Closing out bug report.

Thanks!