--------------------- PatchSet 4685 Date: 2007/06/02 04:58:28 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fix logic error in IPv4-to-v6 special case conversion. Members: lib/IPAddress.cc:1.1.2.43->1.1.2.44 Index: squid3/lib/IPAddress.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/Attic/IPAddress.cc,v retrieving revision 1.1.2.43 retrieving revision 1.1.2.44 diff -u -r1.1.2.43 -r1.1.2.44 --- squid3/lib/IPAddress.cc 31 May 2007 10:39:09 -0000 1.1.2.43 +++ squid3/lib/IPAddress.cc 2 Jun 2007 04:58:28 -0000 1.1.2.44 @@ -1,6 +1,6 @@ /* - * $Id: IPAddress.cc,v 1.1.2.43 2007/05/31 10:39:09 amosjeffries Exp $ + * $Id: IPAddress.cc,v 1.1.2.44 2007/06/02 04:58:28 amosjeffries Exp $ * * DEBUG: section 14 IP Storage and Handling * AUTHOR: Amos Jeffries @@ -986,19 +986,19 @@ out.s6_addr32[1] = 0xFFFFFFFF; out.s6_addr32[2] = 0xFFFFFFFF; out.s6_addr32[3] = 0xFFFFFFFF; - } else if( in.s_addr == 0x7F000001) + } else if( in.s_addr == htonl(0x7F000001)) { /* LOCALHOST */ memset(&out, 0, sizeof(struct in6_addr)); - out.s6_addr32[3] = 0x1; + out.s6_addr32[3] = htonl(0x1); } else { /* general */ memset(&out, 0, sizeof(struct in6_addr)); out.s6_addr32[3] = in.s_addr; - out.s6_addr16[5] = (unsigned short)0xFFFF; + out.s6_addr16[5] = htons((unsigned short)0xFFFF); } } @@ -1015,7 +1015,7 @@ if( IsLocalhost() ) { - out.s_addr = 0x7F000001; + out.s_addr = htonl(0x7F000001); } }