Bug 53823 - [patch] pure IPv6 only host fix (server/config.c)
[patch] pure IPv6 only host fix (server/config.c)
Status: NEW
Product: Apache httpd-2
Classification: Unclassified
Component: Core
2.2.22
All FreeBSD
: P2 normal (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-09-03 19:26 UTC by ohauer
Modified: 2012-09-30 06:11 UTC (History)
1 user (show)



Attachments
Patch which allows apache22/24 to build and work on IPv4 and IPv6 only systems (598 bytes, patch)
2012-09-05 07:47 UTC, ohauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ohauer 2012-09-03 19:26:45 UTC
On a machine with IPv6 only (no IPv4 build into kernel/userland) apache does not start.

The issue and possible fix was reported on the FreeBSD Apache mailing list.
http://lists.freebsd.org/pipermail/freebsd-apache/2012-August/002836.html


--- ./server/config.c.orig      2010-10-07 18:56:54.000000000 +0200
+++ ./server/config.c   2012-09-03 21:23:31.000000000 +0200
@@ -1979,6 +1979,9 @@
     /* NOT virtual host; don't match any real network interface */
     rv = apr_sockaddr_info_get(&s->addrs->host_addr,
                                NULL, APR_INET, 0, 0, p);
+    if (rv != APR_SUCCESS)
+           rv = apr_sockaddr_info_get(&s->addrs->host_addr,
+                           NULL, APR_INET6, 0, 0, p);
     ap_assert(rv == APR_SUCCESS); /* otherwise: bug or no storage */

     s->addrs->host_port = 0; /* matches any port */
Comment 1 ohauer 2012-09-05 07:47:35 UTC
Created attachment 29328 [details]
Patch which allows apache22/24 to build and work on IPv4 and IPv6 only systems

check for APR_HAVE_IPV6