This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11141] New: Resolver uses IPv4-mapped addresses when an IPv6 address is present in /etc/resolv.conf


When an IPv6 nameserver is present in /etc/resolv.conf, the resolver is using 
IPv4-mapped address to contact IPv4 servers. This does not work if bindv6only 
is set to 1, which is sometimes done for security reason.

In resolv/res_send.c (reopen), as res_init() now closes the opened sockets, 
EXT(statp).nssocks[ns] only map to one nameserver. It is therefore possible to 
directly open the socket with the right type. See the attached patch for that.

It is out of scope of this patch, but it is then possible to remove some 
useless code such as convaddr4to6() or EXT(statp).nscount6. It should even be 
possible to remove statp->ipv6_unavail, as a failure to open an IPv6 socket for 
an IPv6 nameserver is a real failure that don't have any fallback.

-- 
           Summary: Resolver uses IPv4-mapped addresses when an IPv6 address
                    is present in /etc/resolv.conf
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11141

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]