httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: PR 7492
Date Tue, 25 Dec 2001 22:32:51 GMT
"Don Hughes" <support@sannotes.org> writes:

> I converted a working Apache1.3 server to Apache2.0 on a SuSE Linux system 
> with IPV6 support.
> 
> All httpd.conf address references are in IPV4 format, all log/status/error messages 
> show all addresses in IPV4 format.  However, I had to use IPV6 address in the 
> VHosts sections or the incoming requests would not match.
> 
> <VirtualHost ::ffff:10.168.xxx.yyy:8080> 

Can you try this patch?

Index: server/vhost.c
===================================================================
RCS file: /cvs/apache/httpd-2.0/server/vhost.c,v
retrieving revision 1.63
diff -u -r1.63 vhost.c
--- vhost.c	2001/11/20 18:27:07	1.63
+++ vhost.c	2001/12/25 22:32:32
@@ -414,6 +414,15 @@
                         sa->ipaddr_len)) {
                 return trav;
             }
+#if APR_HAVE_IPV6
+            else if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sa->ipaddr_ptr) &&
+                cur->sa.sin.sin_family == AF_INET &&
+                !memcmp(&((struct in6_addr *)sa->ipaddr_ptr)->s6_addr[12],
+                        cur->ipaddr_ptr,
+                        4)) {
+                return trav;
+            }
+#endif
         }    
     }
     return NULL;

I definitely need to revisit IPv6 vhost stuff and develop some good
testcases so I can track what works and what doesn't.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...


Mime
View raw message