From: Eduard Bagdasaryan Date: Sat, 25 Nov 2023 07:55:31 +0000 (+0000) Subject: Remove global AclMatchedName from ACL::match() virtual methods (#1594) X-Git-Tag: SQUID_7_0_1~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dc91e6337632f982a530ae7c91aebcab2bc6c2a;p=thirdparty%2Fsquid.git Remove global AclMatchedName from ACL::match() virtual methods (#1594) ... and use ACL::name instead, which became accessible since 8319d47. --- diff --git a/src/acl/Asn.cc b/src/acl/Asn.cc index 663e74d38c..499ce4f1f8 100644 --- a/src/acl/Asn.cc +++ b/src/acl/Asn.cc @@ -541,7 +541,7 @@ Acl::DestinationAsnCheck::match(ACLChecklist * const ch) } else if (!checklist->request->flags.destinationIpLookedUp) { /* No entry in cache, lookup not attempted */ - debugs(28, 3, "can't yet compare '" << AclMatchedName << "' ACL for " << checklist->request->url.host()); + debugs(28, 3, "can't yet compare '" << name << "' ACL for " << checklist->request->url.host()); if (checklist->goAsync(ACLDestinationIP::StartLookup, *this)) return -1; // else fall through to noaddr match, hiding the lookup failure (XXX) diff --git a/src/acl/DestinationDomain.cc b/src/acl/DestinationDomain.cc index 410cab7073..2b86a21e47 100644 --- a/src/acl/DestinationDomain.cc +++ b/src/acl/DestinationDomain.cc @@ -56,7 +56,7 @@ Acl::DestinationDomainCheck::match(ACLChecklist * const ch) } if (lookupBanned) { - debugs(28, 3, "No-lookup DNS ACL '" << AclMatchedName << "' for " << checklist->request->url.host()); + debugs(28, 3, "No-lookup DNS ACL '" << name << "' for " << checklist->request->url.host()); return 0; } @@ -67,7 +67,7 @@ Acl::DestinationDomainCheck::match(ACLChecklist * const ch) /* do we already have the rDNS? match on it if we do. */ if (checklist->dst_rdns) { - debugs(28, 3, "'" << AclMatchedName << "' match with stored rDNS '" << checklist->dst_rdns << "' for " << checklist->request->url.host()); + debugs(28, 3, "'" << name << "' match with stored rDNS '" << checklist->dst_rdns << "' for " << checklist->request->url.host()); return data->match(checklist->dst_rdns); } @@ -84,8 +84,7 @@ Acl::DestinationDomainCheck::match(ACLChecklist * const ch) checklist->dst_rdns = xstrdup(fqdn); return data->match(fqdn); } else if (!checklist->destinationDomainChecked()) { - // TODO: Using AclMatchedName here is not OO correct. Should find a way to the current acl - debugs(28, 3, "Can't yet compare '" << AclMatchedName << "' ACL for " << checklist->request->url.host()); + debugs(28, 3, "Can't yet compare '" << name << "' ACL for " << checklist->request->url.host()); if (checklist->goAsync(StartLookup, *this)) return -1; // else fall through to "none" match, hiding the lookup failure (XXX) diff --git a/src/acl/DestinationIp.cc b/src/acl/DestinationIp.cc index fa4bf9d700..6d285ca070 100644 --- a/src/acl/DestinationIp.cc +++ b/src/acl/DestinationIp.cc @@ -53,7 +53,7 @@ ACLDestinationIP::match(ACLChecklist *cl) if (lookupBanned) { if (!checklist->request->url.hostIsNumeric()) { - debugs(28, 3, "No-lookup DNS ACL '" << AclMatchedName << "' for " << checklist->request->url.host()); + debugs(28, 3, "No-lookup DNS ACL '" << name << "' for " << checklist->request->url.host()); return 0; } diff --git a/src/acl/SourceDomain.cc b/src/acl/SourceDomain.cc index 5f39e489f0..2922b7d392 100644 --- a/src/acl/SourceDomain.cc +++ b/src/acl/SourceDomain.cc @@ -45,8 +45,7 @@ Acl::SourceDomainCheck::match(ACLChecklist * const ch) if (fqdn) { return data->match(fqdn); } else if (!checklist->sourceDomainChecked()) { - // TODO: Using AclMatchedName here is not OO correct. Should find a way to the current acl - debugs(28, 3, "aclMatchAcl: Can't yet compare '" << AclMatchedName << "' ACL for '" << checklist->src_addr << "'"); + debugs(28, 3, "aclMatchAcl: Can't yet compare '" << name << "' ACL for '" << checklist->src_addr << "'"); if (checklist->goAsync(StartLookup, *this)) return -1; // else fall through to "none" match, hiding the lookup failure (XXX)