From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7901 invoked by alias); 23 Feb 2013 18:53:13 -0000 Received: (qmail 7843 invoked by uid 48); 23 Feb 2013 18:52:56 -0000 From: "me at ruff dot mobi" To: glibc-bugs@sourceware.org Subject: [Bug network/14967] getaddrinfo(NULL) with AI_PASSIVE returns 0.0.0.0 and :: (in this order) Date: Sat, 23 Feb 2013 18:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: network X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: me at ruff dot mobi X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Version See Also Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00126.txt.bz2 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' , "\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.