You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2003/05/06 16:23:17 UTC

Re: PATCH: uninitialized variable sin6_slowinfo may cause bind to fail

Brauel, Bjoern wrote:
> Hi everyone,
> 
> I just fell over a small problem trying to run apache 2.0.45 on an AIX5.1
> box. Apache didnt want to start complaining about this:
> 
> # ../bin/apachectl start
> (22)A system call received a parameter that is not valid.: make_sock:
> could not bind to address [::]:80
> no listening sockets available, shutting down

> diff -Naur httpd-2.0.45/srclib/apr/network_io/unix/sockaddr.c
> httpd-2.0.45-fixed/srclib/apr/network_io/unix/sockaddr.c
> --- httpd-2.0.45/srclib/apr/network_io/unix/sockaddr.c	2003-05-06
> 15:27:22.000000000 +0200
> +++ httpd-2.0.45-fixed/srclib/apr/network_io/unix/sockaddr.c	2003-05-06
> 15:29:31.000000000 +0200
> @@ -220,6 +220,7 @@
>      else if (family == APR_INET6) {
>          addr->salen = sizeof(struct sockaddr_in6);
>          addr->addr_str_len = 46;
> +        addr->sa.sin6.sin6_flowinfo = 0; 

We use the socket address filled in by getaddrinfo()...  if we are 
mucking it up, we should fix that... but I don't think that is the case.

I suspect you'll find from a trace of malloc calls that getaddrinfo() 
forgot to initialize the storage containing the sockaddr that it returns 
to Apache/APR.

> Id be glad if this could be included in an official release otherwise Apache
> 2.0.45 is potentially unusable on AIX .

Use "Listen 0.0.0.0:portnumber" unless you really have to have IPv6 
working immediately.

Personally, I only saw this uninitialized sin6_flowinfo problem using a 
non-default malloc and an older level of AIX but if you can verify that 
it affects your box and that the sockaddr returned by getaddrinfo() has 
a bogus sin6_flowinfo then by all means open a PMR with AIX support.