Bug#573456: libc6: getaddrinfo() equates AF_UNSPEC with AF_INET for passive lockups
torsdag den 11 mars 2010 klockan 20:26 skrev Aurelien Jarno detta:
> On Thu, Mar 11, 2010 at 07:48:26PM +0100, Mats Erik Andersson wrote:
> > through the answers that getaddrinfo() care to make. The code
> > is taken from a package I manage and where I am the upstream
> > author. I have observed the same difference between glibc
> > and eglibc for other services I am patching for IPv6 in order
> > to improve the packages for Debian.
>
> This is your interpretation of the AI_PASSIVE code. getaddrinfo() has
> always returned multiple adresses, *even in Lenny*, and your code is
> supposed to cycle through all of them. Nothing in the POSIX function
> says it should return only one entry. This would even be impossible
> in Squeeze, as the bindv6only=1 is the default, which means it is not
> possible to bind to both IPv4 and IPv6 with a single socket.
>
Fair enough, that is why IPV6_V6ONLY is used in my example.
The bad thing is that the return value is independent of
whether I impose net.ipv6.bind6only=0 or not. A clearly viable
conclusion is that eglibc prefers to return an IPv4 wildcard,
whereas glibc preferred to return the IPv6 wildcard first.
> By the way the getaddrinfo code is identical in glibc and eglibc,
> so please stop blaming eglibc.
>
The differences in return order for the address families must therefore
be sought in some other mechanism. This is useful information.
Reply to: