Closed Bug 634019 Opened 13 years ago Closed 6 months ago

Mozilla::LDAP::Conn should support IPv6 addresses

Categories

(Directory :: PerLDAP, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: nkinder, Unassigned)

Details

The Mozilla::LDAP::Conn constructor currently doesn't work properly with IPv6.

When PerLDAP is built against MozLDAP client libraries, both an IPv6 address or a hostname that maps to an IPv6 address will fail to connect.  This seems to be related to teh way ldap_init() is used, which doesn't appear to work properly with IPv6.  We should use MozLPDA routines that support IPv6 in the ldap_init() stub.

When PerLDAP is built against OpenLDAP client libraries, usign a hostname that maps to an IPv6 address does work correctly, but an IPv6 address does not.  The problem is that ldap_initialize() us used behind the scenes in the ldap_init() stub.  A LDAP URL is created and passed to ldap_initialize(), but we don't URL encode the ":" characters in the address first.  This results in a LDAP_PARAM_ERROR being returned.  The fix is to have the ldap_init() stub URL encode the ":" characters prior to creating the URL that we pass to ldap_initialize().  If you replace the ":" chars with "%3A", everything works correctly.

Inactive project, closing

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.