httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject Re: "(97)Address family not supported by protocol" causes "disk ticking"?
Date Thu, 04 Mar 2004 16:59:31 GMT
On Sat, Feb 21, 2004 at 11:00:25AM +0000, Alexis Huxley wrote:
> I'm running apache 2.1dev, and I've posted to the -user list with
> no response, so now I'm a bit stuck as to where next to try, so I'm
> posting here.  Apologies if this is the wrong place.

The bug is that the POD code is doing a name lookup on the first bound
address, which doesn't seem to make much sense since the addresses of
bound listeners are determined just before the POD is opened.

It breaks on Linux systems where getaddrinfo will return AF_INET6
addresses but socket(AF_INET6...) fails.  There's also some interaction
with the new alloc_listener logic on HEAD I presume since nobody has
complained about this with 2.0, not quite sure there.

One-liner is below, proper fix is to remove the sa field from ap_pod_t
and always use ap_listeners->bind_addr in its place, which I'll do
unless anyone can think of a good reason to do a name lookup here.

Index: server/mpm_common.c
RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
retrieving revision 1.117
diff -u -r1.117 mpm_common.c
--- server/mpm_common.c	25 Feb 2004 11:55:31 -0000	1.117
+++ server/mpm_common.c	4 Mar 2004 16:39:48 -0000
@@ -366,8 +366,7 @@
     apr_file_pipe_timeout_set((*pod)->pod_in, 0);
     (*pod)->p = p;
-    apr_sockaddr_info_get(&(*pod)->sa, ap_listeners->bind_addr->hostname,
-                          APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
+    (*pod)->sa = ap_listeners->bind_addr;
     /* close these before exec. */

View raw message