Your message dated Sat, 11 Jan 2025 12:21:30 +0100
with message-id <z4juoh0dim6yb...@aurel32.net>
and subject line Re: Bug#776994: not on jessie
has caused the Debian Bug report #776994,
regarding Random DNS lookup failure when mixing IPV6 and IPV4 resolver and 
using rotate option on /etc/resolv.conf
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
776994: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776994
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: eglibc
Version: 2.13-38+deb7u7

When setting a Postfix server for outgoing mail using a very simple
configuration, I had issues resolving MX entries on the postfix logs like :

Feb  3 20:11:06 londo postfix/smtp[4288]: 3CB504BE8: to=<f...@bar.com>,
relay=none, delay=0.06, delays=0.04/0.01/0/0, dsn=4.4.3, status=deferred
(Host or domain name not found. Name service error for name=bar.com
type=MX: Host not found, try again).

This resolving issue was random (About one of the two tests)

The configuration in /etc/resolv.conf was the following :

nameserver <IPV6 resolver>
nameserver <IPV4 resolver>
nameserver <IPV4 resolver>
options timeout:1 attempts:3 rotate

The three resolvers are OK : I queried them independently and they
answer perfectly so it's not a resolver issue.

After lots of investigations, I isolated the following behaviour : There
is no resolving issue when removing the rotate option OR when putting
the IPV6 resolver after the IPV4 ones.

Browsing on the Web, a chat partner (Thanks Stephane) found this bug on
Redhat/Fedora distributions :
https://bugzilla.redhat.com/show_bug.cgi?id=841787 which seems to be
similar to my bug.

A patch has been applied to the Fedora / RH distributions. This patch is
described here:
http://pkgs.fedoraproject.org/cgit/glibc.git/tree/glibc-rh841787.patch?h=f17.

I updated the patch for the eglibc since a part of the patch was already
into the debian patches series (any/submitted-resolv-init.diff) and
recompiled a package.

After installation, it seems that the issue was solved : The DNS
resolution was 100 % OK.

I send the patch as attachement. (I'm not a low level C developper so i
hope this patch is not too ugly)

Thanks !

Regards,
Olivier Bonhomme






diff -rup a/resolv/res_init.c b/resolv/res_init.c
--- a/resolv/res_init.c 2012-07-26 15:10:45.655638776 -0600
+++ b/resolv/res_init.c 2012-07-26 15:11:27.731423002 -0600
@@ -314,9 +314,9 @@ __res_vinit(res_state statp, int preinit
                        cp++;
                    if ((*cp != '\0') && (*cp != '\n')
                        && __inet_aton(cp, &a)) {
-                       statp->nsaddr_list[nservall].sin_addr = a;
-                       statp->nsaddr_list[nservall].sin_family = AF_INET;
-                       statp->nsaddr_list[nservall].sin_port =
+                       statp->nsaddr_list[nserv].sin_addr = a;
+                       statp->nsaddr_list[nserv].sin_family = AF_INET;
+                       statp->nsaddr_list[nserv].sin_port =
                                htons(NAMESERVER_PORT);
                        nserv++;
 #ifdef _LIBC
diff -rup a/resolv/res_send.c b/resolv/res_send.c
--- a/resolv/res_send.c 2010-05-04 05:27:23.000000000 -0600
+++ b/resolv/res_send.c 2012-07-26 15:34:58.398261659 -0600
@@ -421,10 +421,10 @@ __libc_res_nsend(res_state statp, const
                                EXT(statp).nsmap[n] = MAXNS;
                        }
                }
-               n = statp->nscount;
-               if (statp->nscount > EXT(statp).nscount)
+               n = statp->nscount - EXT(statp).nscount6;
+               if (n > EXT(statp).nscount)
                        for (n = EXT(statp).nscount, ns = 0;
-                            n < statp->nscount; n++) {
+                            n < statp->nscount - EXT(statp).nscount6; n++) {
                                while (ns < MAXNS
                                       && EXT(statp).nsmap[ns] != MAXNS)
                                        ns++;

--- End Message ---
--- Begin Message ---
Version: 2.19-2

Hi,

On 2015-05-01 17:18, Raphaël Droz wrote:
> Just upgraded to Jessie today (libc 2.19-18) and I can't reproduce the bug.
> (while Wheezy-only, it's still an important isn't?)

Indeed, you are correct, a fix for that went into glibc 2.19-2. Closing
the bug accordingly:

  * debian/patches/any/submitted-resolv-ipv6-nameservers.diff: new patch to
    fix resolving issues when using IPv6 nameservers in resolv.conf.  Closes:
    #627531, #644406, #709867.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net

--- End Message ---

Reply via email to