]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct IPv4-mapped prefix, broken in rev 9865 Use POSIX tests for IPv6 address detec...
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Sun, 28 Feb 2010 21:24:17 +0000 (22:24 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Sun, 28 Feb 2010 21:24:17 +0000 (22:24 +0100)
src/ip/IpAddress.cc

index 5259669c44bec7b8c580eaf17236fab36dc37243..75c8d97bd24bc6953eb3596896c9a757b52938ac 100644 (file)
@@ -295,10 +295,10 @@ bool IpAddress::SetIPv4()
 {
 #if USE_IPV6
     static const struct in6_addr v4_localhost = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}
+                0x00, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}
     };
     static const struct in6_addr v4_any = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}
+                0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}
     };
 
     if ( IsLocalhost() ) {
@@ -325,7 +325,7 @@ bool IpAddress::IsLocalhost() const
 {
 #if USE_IPV6
     static const struct in6_addr v4_localhost = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}
+                0x00, 0x00, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}
     };
 
     return IN6_IS_ADDR_LOOPBACK( &m_SocketAddr.sin6_addr ) || IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v4_localhost );