[Bug network/14212] getaddrinfo() with multiple results from /etc/hosts and AF_INET6 in hints fails when /etc/hosts.conf:multi=off
aoliva at sourceware dot org
sourceware-bugzilla@sourceware.org
Sat Sep 27 05:51:00 GMT 2014
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.
More information about the Glibc-bugs
mailing list