This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/9981] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 (IPv4-only) and :: (IPv6+IPv4) in this order
- From: "bugzilla.sourceware.simon at arlott dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 31 May 2014 23:45:50 +0000
- Subject: [Bug network/9981] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 (IPv4-only) and :: (IPv6+IPv4) in this order
- Auto-submitted: auto-generated
- References: <bug-9981-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=9981
--- Comment #11 from Simon Arlott <bugzilla.sourceware.simon at arlott dot org> ---
(In reply to Pavel Åimerda from comment #10)
> (In reply to Simon Arlott from comment #9)
> > It's not safe because the global sysctl net.ipv6.bindv6only could be set to
> > 1 at any time, or the application could use IPV6_V6ONLY=1 on the socket
> > (expecting to receive an IPv4 address too).
>
> Do you see a better way?
There is nothing getaddrinfo() can do about this. It would have been better to
not have the bindv6only sysctl and require an explicit IPV6_V6ONLY=0 on the
socket, but it's too late for that now.
--
You are receiving this mail because:
You are on the CC list for the bug.