public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug network/16826] New: getaddrinfo() doesn't get scope ID for IPv6-only look-ups
@ 2014-04-10  0:26 pub at craig dot mcqueen.id.au
  2014-04-10  0:50 ` [Bug network/16826] " pub at craig dot mcqueen.id.au
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pub at craig dot mcqueen.id.au @ 2014-04-10  0:26 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-22  3:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10  0:26 [Bug network/16826] New: getaddrinfo() doesn't get scope ID for IPv6-only look-ups pub at craig dot mcqueen.id.au
2014-04-10  0:50 ` [Bug network/16826] " pub at craig dot mcqueen.id.au
2014-04-10  7:30 ` schwab@linux-m68k.org
2014-06-12 19:44 ` fweimer at redhat dot com
2014-12-29  1:29 ` ott at mirix dot org
2023-03-21  9:48 ` matthijsvanduin at gmail dot com
2023-03-22  3:16 ` sam at gentoo dot org
2023-03-22  3:17 ` sam at gentoo dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).