I ran into this under OpenBSD 3.4 on a Sun Ultra I; however, it appears to affect other configurations including x86. The code within `mod_proxy' that parses numeric IP addresses is nonportable; by my reading, it works only on 32-bit, big-endian systems. It definitely doesn't work on the 64-bit big-endian system I am using. Here is a patch that fixes the problem for me: <pre> *** mod_proxy.h.orig 2003-08-21 06:11:36.000000000 -0700 --- mod_proxy.h 2003-12-27 20:30:29.000000000 -0800 *************** *** 256,262 **** struct per_thread_data { struct hostent hpbuf; ! u_long ipaddr; char *charpbuf[2]; }; /* Function prototypes */ --- 256,262 ---- struct per_thread_data { struct hostent hpbuf; ! struct in_addr ipaddr; char *charpbuf[2]; }; /* Function prototypes */ *** proxy_util.c.orig 2003-08-21 06:11:36.000000000 -0700 --- proxy_util.c 2003-12-27 20:30:30.000000000 -0800 *************** *** 999,1005 **** return "Host not found"; } else { ! ptd->ipaddr = ap_inet_addr(host); hp = gethostbyaddr((char *)&ptd->ipaddr, sizeof(ptd->ipaddr), AF_INET); if (hp == NULL) { memset(&ptd->hpbuf, 0, sizeof(ptd->hpbuf)); --- 999,1005 ---- return "Host not found"; } else { ! if (inet_aton(host, &ptd->ipaddr) == 0) return "Invalid numeric address"; hp = gethostbyaddr((char *)&ptd->ipaddr, sizeof(ptd->ipaddr), AF_INET); if (hp == NULL) { memset(&ptd->hpbuf, 0, sizeof(ptd->hpbuf)); </pre>
http://httpd.apache.org/dev/patches.html - diff -u
*** Bug 22586 has been marked as a duplicate of this bug. ***