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: Sat, 23 Feb 2013 18:52:55 +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
me at ruff dot mobi changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |me at ruff dot mobi
Version|2.15 |2.17
See Also| |https://launchpad.net/bugs/
| |673708
--- Comment #1 from me at ruff dot mobi 2013-02-23 18:52:55 UTC ---
Here's how rfc3484_sort arguments look like
a1 = {dest_addr = 0x603010,
source_addr = {
sin6_family = 10, sin6_port = 1153, sin6_flowinfo = 0,
sin6_addr = {
__in6_u = {
__u6_addr8 = '\000' <repeats 15 times>, "\001",
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 256},
__u6_addr32 = {0, 0, 0, 16777216}
}
},
sin6_scope_id = 0
},
source_addr_len = 28 '\034',
got_source_addr = true,
source_addr_flags = 0 '\000',
prefixlen = 128 '\200',
index = 1, native = -1
}
a2 = {dest_addr = 0x603070,
source_addr = {
sin6_family = 2, sin6_port = 44220, sin6_flowinfo = 16777343,
sin6_addr = {
__in6_u = {
__u6_addr8 =
"\000\000\000\000\000\000\000\000\000\000\377\377\177\000\000\001",
__u6_addr16 = {0, 0, 0, 0, 0, 65535, 127, 256},
__u6_addr32 = {0, 0, 4294901760, 16777343}
}
},
sin6_scope_id = 0
},
source_addr_len = 16 '\020',
got_source_addr = true,
source_addr_flags = 0 '\000',
prefixlen = 8 '\b',
index = 1, native = -1
}
Definitely "1660 /* Rule 5: Prefer matching label. */" prefers a2 - it has
same lablel for SRC & DST, while a1 has 0 (lo) for SRC and 3 (any) for DST.
In other words here is a collision between implementation, default behaviour of
connect() and RFC recommended default labels definition. Either new label
should be attached to IPv4 loopback
label ::ffff:0f00:1/128 8 (gai.conf)
or getaddrinfo should reset loopback to any in SRC before sorting.
--
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.