directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristinn Örn Sigurðsson <...@root.is>
Subject Re: New LDAP client patch
Date Tue, 10 May 2016 14:28:23 GMT
Hi Emmanuel and thank you for your reply.

Your points are 100% valid and I actually did think about them before I
made the patch.

However, it's not sufficient to be able to fix the issue at hand (at least
in my case).

I don't know beforehand what kind of connectivity the machine will be able
to facilitate. So listing all addresses on the machine and/or enforcing the
system to prefer ipv6 is not an option for me (which also has lots of side
effects in terms of other components of the service we are developing).

I would assume others might be in the same situation. We did some
benchmarking and the performance hit by this patch is very minimal. It was
not an extensive burst performance test though.

Developers that are creating software that needs to be shipped to others as
part of an appliance will most likely run into similar issues as I have -
since I don't know what type of connectivity the appliance will have access.


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

2016-05-10 16:16 GMT+02:00 Emmanuel Lécharny <elecharny@gmail.com>:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message