apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject [Patch] IPv6 on Tru64 broken
Date Mon, 25 Aug 2003 15:52:38 GMT

IPv6 with Apache on tru64 has been broken for a while now, and I finally 
got round to figuring out what it was. It appears that Tru64's
getaddrinfo returns ai_addrlen of 32 for AF_INET6 address, but that
sizeof(struct sockaddr_in6) is 28.

This meant that apr_sockaddr_vars_set() was blindly setting salen
to 28, and then later when Apache called bind( , , 28) Tru64 bombed
out in unpleasant error land. Patch attached. 

Since preserving the value for addrlen returned by getaddrinfo is
a good idea in any event I havn't made this #ifdef OSF1, there
may be more systems which rely on this behaviour and there's nothing
in the standards prohibiting it.

Also attached is a C prog to test which systems behave in this

bash-2.05a$ uname -a
OSF1 athene.heanet.ie V5.1 732 alpha
bash-2.05a$ gcc -o madness madness.c 
bash-2.05a$ ./madness 
sizeof(struct sockaddr_in6) = 28
addrinfo->ai_addrlen        = 32

Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net
colm@stdlib.net					  http://www.stdlib.net/

View raw message