This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14967] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 and :: (in this order)
- From: "me at ruff dot mobi" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 26 Feb 2013 07:39:50 +0000
- Subject: [Bug network/14967] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 and :: (in this order)
- Auto-submitted: auto-generated
- References: <bug-14967-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14967
--- Comment #9 from Ruslan N. Marchenko <me at ruff dot mobi> 2013-02-26 07:39:50 UTC ---
Well, I can oppose that validating source address with connect() for addresses
supposed to be used by bind() is an ugly hack :).
getaddrinfo() should return all available addresses, it's just if AF_INET6 is
available by default it should returned first. getaddrinfo() cannot know
whether you're going to use V6ONLY option or not, and with that option both
returned addresses are valid and bind()-able.
Sorry, preparing patch takes longer than I expected, will try to finish till
that evening.
--
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.