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/9981] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 (IPv4-only) and :: (IPv6+IPv4) in this order


https://sourceware.org/bugzilla/show_bug.cgi?id=9981

Alexandre Oliva <aoliva at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at sourceware dot org

--- Comment #7 from Alexandre Oliva <aoliva at sourceware dot org> ---
Created attachment 7624
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7624&action=edit
Don't sort passive localhost addresses, so that IPv6+IPvv4 remains first and
IPv4-only, last

I don't think it ever makes any sense for us to ever try to sort passive
addresses: we always generate them IPv6+IPv4 first and IPv4-only last, with at
most two adresses and possibly only one if we asked for a specific family. 
Since the former is always preferred, it doesn't make sense to try to sort
them.

The only doubt is whether to generate both when the first covers both; I'm not
when dropping the latter is safe, so I'm leaving that unrelated decision out
for now.

Any reason to not go with this patch?

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