Re: glibc's getaddrinfo() sort order
* Clint Adams:
> On Tue, Sep 18, 2007 at 08:41:45PM +0200, Kurt Roeckx wrote:
>> glibc is the only implementation I know of that does this.
>
> I have heard, though not confirmed first-hand, that modern
> versions of FreeBSD, Windows, and Solaris do as well.
FreeBSD 6.2-RELEASE doesn't do it. And neither does Fedora (with GNU
libc 2.6.90-15, IPv6 not enabled). (Windows is an entirely different
matter because the resolver model is completely different.)
You can run the following test program repeatedly to check if every A
record gets its chance.
import socket
print ', '.join(map(lambda x: x[4][0],
socket.getaddrinfo('pool.ntp.org', 123, 0, socket.SOCK_DGRAM)))
Reply to: