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
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
OK, sorry, there is gai.conf.
Merging two reports for one bug. *** This bug has been marked as a duplicate of bug 9981 ***