public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pub at craig dot mcqueen.id.au" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug network/16826] New: getaddrinfo() doesn't get scope ID for IPv6-only look-ups
Date: Thu, 10 Apr 2014 00:26:00 -0000	[thread overview]
Message-ID: <bug-16826-131@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2014-04-10  0:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  0:26 pub at craig dot mcqueen.id.au [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-16826-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).