This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14212] getaddrinfo() with multiple results from /etc/hosts and AF_INET6 in hints fails when /etc/hosts.conf:multi=off
- From: "aoliva at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 27 Sep 2014 05:51:00 +0000
- Subject: [Bug network/14212] getaddrinfo() with multiple results from /etc/hosts and AF_INET6 in hints fails when /etc/hosts.conf:multi=off
- Auto-submitted: auto-generated
- References: <bug-14212-131 at http dot sourceware dot org/bugzilla/>
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.