From: kostas <> Date: Fri, 9 Jan 1998 06:41:23 +0000 (+0000) Subject: Fixed bug with looking up no_addr in the radix tree. X-Git-Tag: SQUID_3_0_PRE1~4220 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c46dd261bfa50215ef37e9e55fa0ff14dff22b4;p=thirdparty%2Fsquid.git Fixed bug with looking up no_addr in the radix tree. --- diff --git a/src/acl.cc b/src/acl.cc index 04038bc406..8abae703f0 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.128 1998/01/05 21:44:39 wessels Exp $ + * $Id: acl.cc,v 1.129 1998/01/08 23:41:25 kostas Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1294,7 +1294,7 @@ aclMatchAcl(struct _acl *acl, aclCheck_t * checklist) acl->name, r->host); checklist->state[ACL_DST_ASN] = ACL_LOOKUP_NEEDED; } else { - return asnMatchIp(&(acl->data), no_addr); + return asnMatchIp(acl->data, no_addr); } return 0; #if USE_ARP_ACL diff --git a/src/asn.cc b/src/asn.cc index 81f2748fb7..dd371b4805 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,5 +1,5 @@ /* - * $Id: asn.cc,v 1.11 1998/01/02 22:04:36 wessels Exp $ + * $Id: asn.cc,v 1.12 1998/01/08 23:41:23 kostas Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -108,7 +108,7 @@ asnMatchIp(void *data, struct in_addr addr) lh = ntohl(addr.s_addr); debug(53, 4) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr)); - if (AS_tree_head == 0 || &addr == &no_addr) + if (AS_tree_head == 0 || !memcmp(&addr, &no_addr,sizeof(addr))) return 0; store_m_int(lh, m_addr); rn = rn_match(m_addr, AS_tree_head);