This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/16826] New: getaddrinfo() doesn't get scope ID for IPv6-only look-ups
- From: "pub at craig dot mcqueen.id.au" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 10 Apr 2014 00:25:56 +0000
- Subject: [Bug network/16826] New: getaddrinfo() doesn't get scope ID for IPv6-only look-ups
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16826
Bug ID: 16826
Summary: getaddrinfo() doesn't get scope ID for IPv6-only
look-ups
Product: glibc
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: network
Assignee: unassigned at sourceware dot org
Reporter: pub at craig dot mcqueen.id.au
I'm trying to follow up on Ubuntu Launchpad bug #369008, in which mDNS IPv6
look-ups don't get the scope ID. There is a patch for nss-mdns which makes it
work by implementing _nss_gethostbyname4_r(), which is the only way to pass
through the IPv6 scope ID. However, while it works for lookups with family
AF_UNSPEC, it doesn't work for family AF_INET6.
It turns out that getaddrinfo() is calling _nss_gethostbyname4_r() only for
lookups with family AF_UNSPEC. But for family AF_INET6, it is calling
_nss_gethostbyname2_r() instead. It really should always call
_nss_gethostbyname4_r() for any IPv6 look-ups, in order to get the IPv6 scope
ID.
It used to work, however, I've traced the problem to glibc git commit
8479f23aa1.
http://repo.or.cz/w/glibc.git/commit/8479f23aa1d5e5477a37f46823856bdafaedfa46
In that commit, it was changed to only use _nss_gethostbyname4_r() for
AF_UNSPEC, and not AF_INET6. That breaks IPv6 scope ID retrieval. Can we revert
that change?
--
You are receiving this mail because:
You are on the CC list for the bug.