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 20:09:23 +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 #11 from Ruslan N. Marchenko <me at ruff dot mobi> 2013-02-26 20:09:23 UTC ---
Ok, here is the test script:
Native GLIBC - wrong result (0.0.0.0,::)
>>
glibc-build$ ../b 1234
socket(2, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=2; LEN=16
[0.0.0.0:1234] ---> [(null):1234]
Len: 16, 16
socket(10, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=10; LEN=28
[:::1234] ---> [(null):1234]
Len: 28, 28
<<<
Patched GLIBC - correct result (::,0.0.0.0)
>>>
glibc-build$ /opt/jack/lib/ld-linux-x86-64.so.2 --library-path /opt/jack/lib
../b 1234
socket(10, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=10; LEN=28
[:::1234] ---> [(null):1234]
Len: 28, 28
socket(2, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=2; LEN=16
[0.0.0.0:1234] ---> [(null):1234]
Len: 16, 16
<<<
Native GLIBC+GAI V4Mapped lo workaround - correct result (::,0.0.0.0)
>>>
glibc-build$ sudo bash -c "echo 'label ::ffff:0f00:1/128 8' >> /etc/gai.conf"
[sudo] password for ruff:
glibc-build$ ../b 1234
socket(10, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=10; LEN=28
[:::1234] ---> [(null):1234]
Len: 28, 28
socket(2, 2, 17)
socket: Success
bind/connect: Success
getsockname: AF=2; LEN=16
[0.0.0.0:1234] ---> [(null):1234]
Len: 16, 16
glibc-build$
>>>
--
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.