Bug 14211 - getaddrinfo() doesn't order results correctly when node is NULL
Summary: getaddrinfo() doesn't order results correctly when node is NULL
Status: RESOLVED DUPLICATE of bug 9981
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 05:00 UTC by Mike Frysinger
Modified: 2014-06-14 05:32 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
gai_bug.c by Hans Nieser (397 bytes, text/plain)
2012-06-09 05:00 UTC, Mike Frysinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2012-06-09 05:00:27 UTC
Created attachment 6443 [details]
gai_bug.c by Hans Nieser

if node==NULL when calling getaddrinfo(), the results are not sorted correctly

in the attached test case, you can see:
$ gcc gai_bug.c && ./a.out 4242
this is an IPv4 result
this is an IPv6 result

it should have returned the IPv6 result first
Comment 1 Jan Kratochvil 2012-11-27 17:47:39 UTC
I do not see anything about returned values order in:
http://tools.ietf.org/html/rfc3493
6.1 Protocol-Independent Nodename and Service Name Translation
Comment 2 Jan Kratochvil 2012-11-27 18:04:00 UTC
OK, sorry, there is gai.conf.
Comment 3 Pavel Šimerda 2012-12-22 20:53:03 UTC
Merging two reports for one bug.

*** This bug has been marked as a duplicate of bug 9981 ***