This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/12398] AI_ADDRCONFIG breaks getaddrinfo() calls for loopback names and addresses


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

Pavel Åimerda <psimerda at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|loopback addresses          |AI_ADDRCONFIG breaks
                   |shouldn't be disregarded by |getaddrinfo() calls for
                   |getaddrinfo()+AI_ADDRCONFIG |loopback names and
                   |when looking up "localhost" |addresses

--- Comment #4 from Pavel Åimerda <psimerda at redhat dot com> 2012-11-20 23:13:20 UTC ---
By the way, I just learned that the current behavior is not mandated by POSIX.
Thanks to Jeff Law for valuable information he provided:

http://pubs.opengroup.org/onlinepubs/9699919799/

If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be returned only
if an IPv4 address is configured on the local system, [IP6] [Option Start]  and
IPv6 addresses shall be returned only if an IPv6 address is configured on the
local system. [Option End]

Jeff: It may also be the case that we need to involve the "Austin Group" if we
need further clarification of the standard (link-local handling comes to mind).

My summary is:

Filtering of non-DNS addresses in getaddrinfo() has no real use
and it only causes problems. There's no reason to filter over the
mere existence of addresses. Filtering over global address existence
may only be desirable for global address resolution, which is DNS. But
that should be done by the DNS resolver that only asks for addresses
that make sense and only accepts addresses that it asks for.

-- 
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]