You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by kristinn <gi...@git.apache.org> on 2016/05/02 10:58:54 UTC

[GitHub] directory-shared pull request: Support for DNS names that both hav...

GitHub user kristinn opened a pull request:

    https://github.com/apache/directory-shared/pull/2

    Support for DNS names that both have A and AAAA records.

    We were having an issue that I could describe like this.
    
    We were running IPv6 tests in an IPv6 only environment. The DNS name for
    the test ldap server had both IPv4 and IPv6 records (A and AAAA
    respectively).
    The LDAP client only tried to connect to the first DNS record retrieved,
    which in our case was always the IPv4 address.
    This caused all our LDAP connections to fail.
    
    This patch lists all A and AAAA records for a DNS name and tries to
    connect to them simultaneously. The first socket that succeeds is used
    and the others are dropped.
    
    I do realize this might have a bit of performance penalty. However, the
    library is designed to reuse connections so I hope this change will be
    much more of a benefit than a bottleneck.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kristinn/directory-shared ldap-retry

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/directory-shared/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit ddc4ded10644c93086e36a850c6a4f420f0a827f
Author: Kristinn �rn Sigur�sson <ko...@root.is>
Date:   2016-04-25T13:59:48Z

    Support for DNS names that both have A and AAAA records.
    
    We were having an issue that I could describe like this.
    
    We were running IPv6 tests in an IPv6 only environment. The DNS name for
    the test ldap server had both IPv4 and IPv6 records (A and AAAA
    respectively).
    The LDAP client only tried to connect to the first DNS record retrieved,
    which in our case was always the IPv4 address.
    This caused all our LDAP connections to fail.
    
    This patch lists all A and AAAA records for a DNS name and tries to
    connect to them simultaneously. The first socket that succeeds is used
    and the others are dropped.
    
    I do realize this might have a bit of performance penalty. However, the
    library is designed to reuse connections so I hope this change will be
    much more of a benefit than a bottleneck.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] directory-shared pull request: Support for DNS names that both hav...

Posted by Emmanuel Lécharny <el...@gmail.com>.
Thanks Kristinn !

just coming back from vacation, I'll review the pull request asap.

Le 02/05/16 10:58, kristinn a �crit :
> GitHub user kristinn opened a pull request:
>
>     https://github.com/apache/directory-shared/pull/2
>
>     Support for DNS names that both have A and AAAA records.
>
>     We were having an issue that I could describe like this.
>     
>     We were running IPv6 tests in an IPv6 only environment. The DNS name for
>     the test ldap server had both IPv4 and IPv6 records (A and AAAA
>     respectively).
>     The LDAP client only tried to connect to the first DNS record retrieved,
>     which in our case was always the IPv4 address.
>     This caused all our LDAP connections to fail.
>     
>     This patch lists all A and AAAA records for a DNS name and tries to
>     connect to them simultaneously. The first socket that succeeds is used
>     and the others are dropped.
>     
>     I do realize this might have a bit of performance penalty. However, the
>     library is designed to reuse connections so I hope this change will be
>     much more of a benefit than a bottleneck.
>
> You can merge this pull request into a Git repository by running:
>
>     $ git pull https://github.com/kristinn/directory-shared ldap-retry
>
> Alternatively you can review and apply these changes as the patch at:
>
>     https://github.com/apache/directory-shared/pull/2.patch
>
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
>
>     This closes #2
>     
> ----
> commit ddc4ded10644c93086e36a850c6a4f420f0a827f
> Author: Kristinn �rn Sigur�sson <ko...@root.is>
> Date:   2016-04-25T13:59:48Z
>
>     Support for DNS names that both have A and AAAA records.
>     
>     We were having an issue that I could describe like this.
>     
>     We were running IPv6 tests in an IPv6 only environment. The DNS name for
>     the test ldap server had both IPv4 and IPv6 records (A and AAAA
>     respectively).
>     The LDAP client only tried to connect to the first DNS record retrieved,
>     which in our case was always the IPv4 address.
>     This caused all our LDAP connections to fail.
>     
>     This patch lists all A and AAAA records for a DNS name and tries to
>     connect to them simultaneously. The first socket that succeeds is used
>     and the others are dropped.
>     
>     I do realize this might have a bit of performance penalty. However, the
>     library is designed to reuse connections so I hope this change will be
>     much more of a benefit than a bottleneck.
>
> ----
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---