directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: New LDAP client patch
Date Tue, 10 May 2016 14:16:27 GMT
Le 10/05/16 15:12, Kristinn Örn Sigurðsson a écrit :
> Hi everybody.
>
> All feedback is greatly appreciated.

Sorry, I totally forgot to answer...

More inline.
>
> Thank you.
>
>
> --
> Kveðja / Best regards,
> Kristinn Örn Sigurðsson.
>
> 2016-05-02 10:59 GMT+02:00 Kristinn Örn Sigurðsson <kos@root.is>:
>
>> 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.
Yep.

>>
>> 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 think this is overkilling. You will get all the addresses using
getAllByName(), and you need to use the one that is IPV6. If your client
is an IPV6 client, that will be just fine.

You probably need to enforce IPV6 on the client too :

System.setProperty( " |java.net.preferIPv6Addresses", "true" );


The real issue here is when you don't know if your client is IPV4 or
IPV6. OTOH, if the client is IPV4 only and the server is IPV6 only, you
are doomed.

||wdyt ?|

Mime
View raw message