On Thu, Mar 11, 2010 at 07:48:26PM +0100, Mats Erik Andersson wrote:
> The authentic code included below intends to establish a listening
> socket that listens to IPv6 as well as to IPv4.
> 
> With libc6-2.7 in Lenny, and also FreeBSD 6.4, this functions as intended,
> but with Squeeze and eglibc-2.10.2 the only listening socket sits in IPv4.
> Nothing at all is tied to IPv6.
> 
> Being a passive resolution there should be no reason to cycle
> 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.

By the way the getaddrinfo code is identical in glibc and eglibc, 
so please stop blaming eglibc.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to