Re: Apache Virtual host confuration and logging under IPv6
In article <[🔎] 20000810164131.B707@eye-net.com.au> (at Thu, 10 Aug 2000 16:41:31 +1000), csmall@eye-net.com.au (Craig Small) says:
> Most interesting, why is it port 80->2048 and 443->1024?
"10.0.0.0" problem lies in ap_snprintf() calling.
I've committed fixes into KAME repository.
Some vhost port problem is fixed in 20000524a.
Kitame, would you sync with latest KAME patch apache-1.3.12-v6-20000524a
and apply the following, please?
Index: README.v6
===================================================================
RCS file: /cvsroot/apps/apache13/README.v6,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- README.v6 2000/01/26 12:38:02 1.22
+++ README.v6 2000/08/10 08:42:24 1.23
@@ -1,6 +1,6 @@
IPv6-ready apache 1.3.x
KAME Project
-$Id: README.v6,v 1.22 2000/01/26 12:38:02 itojun Exp $
+$Id: README.v6,v 1.23 2000/08/10 08:42:24 yoshfuji Exp $
This patchkit enables apache 1.3.x to perform HTTP connection over IPv6.
Most of optional modules are left unchanged, i.e. it won't support IPv6,
@@ -129,7 +129,7 @@
use configure.v6 for convenience,
- Linux IPv6 stack, http://www.linux.org/
use configure.v6 for convenience.
-- Solaris 7 IPv6 stack, http://www.sun.com/
+- Solaris 8 IPv6 stack, http://www.sun.com/
use configure.v6 for convenience.
To disable IPv6 support, specify --disable-rule=INET6 to the "configure"
script.
Index: src/ap/ap_snprintf.c
===================================================================
RCS file: /cvsroot/apps/apache13/src/ap/ap_snprintf.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/ap/ap_snprintf.c 2000/01/26 12:38:07 1.8
+++ src/ap/ap_snprintf.c 2000/08/10 08:38:50 1.9
@@ -517,6 +517,8 @@
strcpy(hostnamebuf, "???");
strcpy(portnamebuf, "???");
}
+ if (strcmp(portnamebuf,"0") == 0)
+ strcpy(portnamebuf, "*");
q = portnamebuf + strlen(portnamebuf);
while (portnamebuf < q)
*--p = *--q;
Index: src/main/http_vhost.c
===================================================================
RCS file: /cvsroot/apps/apache13/src/main/http_vhost.c,v
retrieving revision 1.25
retrieving revision 1.27
diff -u -r1.25 -r1.27
--- src/main/http_vhost.c 2000/05/21 15:35:14 1.25
+++ src/main/http_vhost.c 2000/08/10 08:40:42 1.27
@@ -219,7 +219,7 @@
#ifndef INET6
|| ap_default_family == PF_UNSPEC
#endif
- ) && strcasecmp(w, "default") == 0)){
+ ) && strcasecmp(w, "_default_") == 0)){
hoststr = "255.255.255.255";
hints.ai_family = PF_INET;
}
@@ -227,7 +227,7 @@
else if (strcasecmp(w, "_default6_") == 0 ||
((ap_default_family == PF_INET6
|| ap_default_family == PF_UNSPEC
- ) && strcasecmp(w, "default") == 0)){
+ ) && strcasecmp(w, "_default_") == 0)){
hoststr = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff";
hints.ai_family = PF_INET6;
}
@@ -500,12 +500,7 @@
fprintf(f, "VirtualHost configuration:\n");
for (i = 0; i < IPHASH_TABLE_SIZE; ++i) {
for (ic = iphash_table[i]; ic; ic = ic->next) {
- if (ic->sar->host_port == 0) {
- ap_snprintf(buf, sizeof(buf), "%pA:*", &ic->sar->host_addr);
- }
- else {
- ap_snprintf(buf, sizeof(buf), "%pI", &ic->sar->host_addr);
- }
+ ap_snprintf(buf, sizeof(buf), "%pI", &ic->sar->host_addr);
if (ic->names == NULL) {
fprintf(f, "%-22s %s (%s:%u)\n", buf,
ic->server->server_hostname, ic->server->defn_name,
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@v6.linux.or.jp>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515 1323 1806 A96F 5700 6B25
Reply to: