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 network/14212] getaddrinfo() with multiple results from /etc/hosts and AF_INET6 in hints fails when /etc/hosts.conf:multi=off


https://sourceware.org/bugzilla/show_bug.cgi?id=14212

Alexandre Oliva <aoliva at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |aoliva at sourceware dot org
         Resolution|---                         |FIXED

--- Comment #2 from Alexandre Oliva <aoliva at sourceware dot org> ---
This was fixed, apparently by accident, with the patch for bug 14505, commit
8479f23aa1.  It disabled the use of the nss gethostbyname4 interface for
non-AF_UNSPEC queries.  Without the patch, we'd use gethostbyname4, get only
the
IPv4 address from the hosts plugin (because multi is off, and gethostbyname4
doesn't know what address family we're looking for), and discard that address
as unsuitable.  With the patch, we use gethostbyname2 to look up IPv6 addresses
only.  It doesn't perform V4MAPPED conversions, for the hconf flag that would
do so is explicitly cleared by getaddrinfo, that would look up IPv4 addresses
separately afterwards in case of no IPv6 matches.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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