directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristinn Örn Sigurðsson <>
Subject New LDAP client patch
Date Mon, 02 May 2016 08:59:16 GMT
Hello everybody.

I have a patch I would like to contribute to the LDAP client.

Let's say you have a machine that has no IPv4 connectivity, only IPv6. You
want to connect to a LDAP server with a hostname that resolves both to an
IPv4 and IPv6 address.

Currently you would (most likely) not be able to connect because the client
code selects the first result returned by the DNS as the IP to use. That is
often the IPv4 address.

My patch tries to initiate a socket connection to all the returned IP
addresses simultaneously (without applying the LDAP request that caused the
connection to be initiated). The first successful connection is selected
and all the others are discarded.

I know this is not as efficient as just connecting to one IP, but I try to
make it as efficient as possible (I'm not a java veteran).

I did think about scanning the interfaces of the machine and try to
determine what kind of connectivity we have and from there pick the right
IP to connect to (if the DNS query returns both A and AAAA records).
However, that would only be, at best, guess work.

I did create a pull request where you host your mirror at github. I didn't
see any better way to provide the code to you.

The pull request is available at

All suggestions and comments are greatly appreciated.

Thank you!

Kveðja / Best regards,
Kristinn Örn Sigurðsson.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message