directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radovan Semancik <Radovan.Seman...@evolveum.com>
Subject Re: New LDAP client patch
Date Tue, 10 May 2016 14:45:09 GMT
Hi,

I'm OK with that. But I would like to see it as an optional feature that can be turned on
in LdapConnectionConfig.

I have looked at the code in pull request. The code goes quite deep into connection handling
code and I'm still not 100% sure that I understand that. It will probably need an review from
someone else (Emmanuel?)

-- 
Radovan Semancik
Software Architect
evolveum.com

----- Original Message -----
> From: "Kristinn Örn Sigurðsson" <kos@root.is>
> To: api@directory.apache.org
> Sent: Tuesday, May 10, 2016 3:12:38 PM
> Subject: Re: New LDAP client patch
> 
> Hi everybody.
> 
> All feedback is greatly appreciated.
> 
> 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.
> >
> > 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
> > https://github.com/apache/directory-shared/pull/2
> >
> > All suggestions and comments are greatly appreciated.
> >
> > Thank you!
> >
> > --
> > Kveðja / Best regards,
> > Kristinn Örn Sigurðsson.
> >
> 

Mime
View raw message