public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12377] New: getaddrinfo() should disregard link-local IPv6 addresses for AI_ADDRCONFIG purposes
@ 2011-01-08 20:57 tore at fud dot no
  2011-02-11 15:54 ` [Bug libc/12377] " tore at fud dot no
                   ` (39 more replies)
  0 siblings, 40 replies; 41+ messages in thread
From: tore at fud dot no @ 2011-01-08 20:57 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12377

           Summary: getaddrinfo() should disregard link-local IPv6
                    addresses for AI_ADDRCONFIG purposes
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: tore@fud.no


If the system is configured with link-local (and loopback) IPv6 addresses only,
getaddrinfo() will look up AAAA records in DNS and return any results to the
caller, even if the caller is specififying the AI_ADDRCONFIG hint.

This defeats the purpose of AI_ADDRCONFIG, as an IPv6-capable operating system
(which includes all modern GNU/Linux distributions) will automatically
configure link-local IPv6 addresses on every interface.

RFC 2553 says the following about AI_ADDRCONFIG:

      - The AI_ADDRCONFIG flag specifies that a query for AAAA records
        should occur only if the node has at least one IPv6 source
        address configured and a query for A records should occur only
        if the node has at least one IPv4 source address configured.

While it does not mention link-local (or loopback) addresses specifically, it
is obvious that its intended use is to allow an application to avoid getting
addresses returned that cannot be used for communication.  In that regard
link-local addresses are very similar to loopback addresses, in the sense that
they're automatically configured on all hosts regardless of any external
connectivity, and can not be used when communicating with the outside world. 
And, as it happens, loopback addresses are already disregarded by getaddrinfo()
for AI_ADDRCONFIG (even for IPv4 loopback addresses).  This is done in in
sysdeps/unix/sysv/linux/check_pf.cl line 179, in make_request().

For what it's worth, both Microsoft Windows and Mac OS X appear to disregard
link-local IPv6 addresses for AI_ADDRCONFIG purposes, with no apparent ill
effects.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2023-09-20 15:12 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-08 20:57 [Bug libc/12377] New: getaddrinfo() should disregard link-local IPv6 addresses for AI_ADDRCONFIG purposes tore at fud dot no
2011-02-11 15:54 ` [Bug libc/12377] " tore at fud dot no
2011-07-06 20:30 ` rick.jones2 at hp dot com
2011-07-07  9:20 ` tore at fud dot no
2011-07-07 17:25 ` rick.jones2 at hp dot com
2011-07-07 19:37 ` rick.jones2 at hp dot com
2011-07-08 15:17 ` tore at fud dot no
2011-07-08 16:48 ` rick.jones2 at hp dot com
2011-07-09 11:29 ` tore at fud dot no
2011-07-16  5:37 ` nick.jones@network-box.com
2012-02-19  4:23 ` allan at archlinux dot org
2012-02-21  2:06 ` [Bug network/12377] " jsm28 at gcc dot gnu.org
2012-07-27 13:53 ` psimerda at redhat dot com
2012-07-27 14:01 ` psimerda at redhat dot com
2012-07-27 14:07 ` psimerda at redhat dot com
2012-07-27 14:11 ` psimerda at redhat dot com
2012-07-29  8:30 ` psimerda at redhat dot com
2012-07-29 10:41 ` psimerda at redhat dot com
2012-07-31 12:19 ` tore at fud dot no
2012-07-31 13:17 ` psimerda at redhat dot com
2012-07-31 13:34 ` psimerda at redhat dot com
2012-07-31 13:59 ` tore at fud dot no
2012-07-31 15:01 ` psimerda at redhat dot com
2012-07-31 15:51 ` psimerda at redhat dot com
2012-07-31 18:34 ` tore at fud dot no
2012-07-31 19:00 ` tore at fud dot no
2012-07-31 22:22 ` psimerda at redhat dot com
2012-08-01  9:22 ` tore at fud dot no
2012-08-01 23:16 ` orion at cora dot nwra.com
2012-09-22 15:44 ` psimerda at redhat dot com
2012-11-20 23:16 ` [Bug network/12377] AI_ADDRCONFIG option breaks getaddrinfo() resolution for node-local names and addresses (localhost) psimerda at redhat dot com
2012-11-20 23:18 ` [Bug network/12377] getaddrinfo() should disregard link-local IPv6 addresses for AI_ADDRCONFIG purposes psimerda at redhat dot com
2012-12-06  7:04 ` gaofeng at cn dot fujitsu.com
2012-12-18 14:33 ` psimerda at redhat dot com
2012-12-18 14:42 ` [Bug network/12377] getaddrinfo() with AI_ADDRCONFIG won't suppress AAAA queries when only IPv6 loopback and link-local addresses are present psimerda at redhat dot com
2013-08-29 12:45 ` [Bug network/12377] getaddrinfo() with AI_ADDRCONFIG won't suppress AAAA DNS " psimerda at redhat dot com
2014-02-16 18:23 ` jackie.rosen at hushmail dot com
2014-05-28 19:46 ` schwab at sourceware dot org
2014-05-28 19:47 ` schwab at sourceware dot org
2014-06-27 12:32 ` fweimer at redhat dot com
2023-09-20 15:12 ` chrysn at fsfe 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).