--------------------- PatchSet 4138 Date: 2007/04/01 02:58:16 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fix: 'all' acl not being matched. Members: NOTES-IPv6:1.1.2.7->1.1.2.8 lib/IPAddress.cc:1.1.2.15->1.1.2.16 src/ACLIP.cc:1.8.2.18->1.8.2.19 src/comm.h:1.16.8.3->1.16.8.4 Index: squid3/NOTES-IPv6 =================================================================== RCS file: /cvsroot/squid-sf//squid3/Attic/NOTES-IPv6,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- squid3/NOTES-IPv6 28 Mar 2007 09:42:04 -0000 1.1.2.7 +++ squid3/NOTES-IPv6 1 Apr 2007 02:58:16 -0000 1.1.2.8 @@ -1,7 +1,11 @@ -$Id: NOTES-IPv6,v 1.1.2.7 2007/03/28 09:42:04 amosjeffries Exp $ +$Id: NOTES-IPv6,v 1.1.2.8 2007/04/01 02:58:16 amosjeffries Exp $ KNOWN BUGS: +Backout old partial conversion from comm.cc + +PROBLEM: Segmentation Fault on peer ident lookup +CAUSE: address port is set to empty at some point during the ident lookup calls PROBLEM: Attempts to connect to Port 20480 instead of 80 Index: squid3/lib/IPAddress.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/Attic/IPAddress.cc,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -u -r1.1.2.15 -r1.1.2.16 --- squid3/lib/IPAddress.cc 1 Apr 2007 00:44:28 -0000 1.1.2.15 +++ squid3/lib/IPAddress.cc 1 Apr 2007 02:58:17 -0000 1.1.2.16 @@ -1,5 +1,5 @@ /* - * $Id: IPAddress.cc,v 1.1.2.15 2007/04/01 00:44:28 amosjeffries Exp $ + * $Id: IPAddress.cc,v 1.1.2.16 2007/04/01 02:58:17 amosjeffries Exp $ */ #include "IPAddress.h" @@ -459,9 +459,7 @@ if(*l < *r) return -1; if(*l > *r) return 1; } - - // finally if addr are equal the port determines equality. - return (m_SocketAddr.sin6_port - rhs.m_SocketAddr.sin6_port); + return true; } bool IPAddress::operator ==(const IPAddress &s) const Index: squid3/src/ACLIP.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLIP.cc,v retrieving revision 1.8.2.18 retrieving revision 1.8.2.19 diff -u -r1.8.2.18 -r1.8.2.19 --- squid3/src/ACLIP.cc 27 Mar 2007 09:04:03 -0000 1.8.2.18 +++ squid3/src/ACLIP.cc 1 Apr 2007 02:58:17 -0000 1.8.2.19 @@ -1,5 +1,5 @@ /* - * $Id: ACLIP.cc,v 1.8.2.18 2007/03/27 09:04:03 amosjeffries Exp $ + * $Id: ACLIP.cc,v 1.8.2.19 2007/04/01 02:58:17 amosjeffries Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -136,9 +136,9 @@ } else { /* range address check */ if ( (A >= q->addr1) && (A <= q->addr2) ) - return 0; /* valid */ + return true; /* valid */ else - return -1; /* outside of range, 'less than' */ + return false; /* outside of range, 'less than' */ } } @@ -243,9 +243,9 @@ IPAddressType iptype = None; char tmpbuf[MAX_IPSTRLEN]; - if (!strcasecmp(t, "all")) { + if (strcasecmp(t, "all") == 0) { q->addr1.SetAnyAddr(); - q->addr2.SetAnyAddr(); + q->addr2.SetNoAddr(); q->mask.SetAnyAddr(); return q; } Index: squid3/src/comm.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.h,v retrieving revision 1.16.8.3 retrieving revision 1.16.8.4 diff -u -r1.16.8.3 -r1.16.8.4 --- squid3/src/comm.h 17 Feb 2007 11:03:38 -0000 1.16.8.3 +++ squid3/src/comm.h 1 Apr 2007 02:58:17 -0000 1.16.8.4 @@ -47,7 +47,7 @@ #endif SQUIDCEXTERN void commConnectStart(int fd, const char *, u_short, CNCB *, void *); -SQUIDCEXTERN int comm_connect_addr(int sock, IPAddress &addr); +SQUIDCEXTERN int comm_connect_addr(int sock, const IPAddress &addr); SQUIDCEXTERN void comm_init(void); SQUIDCEXTERN int comm_open(int, int, struct IN_ADDR, u_short port, int, const char *note);