]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove global AclMatchedName from ACL::match() virtual methods (#1594)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Sat, 25 Nov 2023 07:55:31 +0000 (07:55 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 25 Nov 2023 07:55:43 +0000 (07:55 +0000)
... and use ACL::name instead, which became accessible since 8319d47.

src/acl/Asn.cc
src/acl/DestinationDomain.cc
src/acl/DestinationIp.cc
src/acl/SourceDomain.cc

index 663e74d38ced4186811a67f26429a0413e4d9bcb..499ce4f1f8c7b2fb64e057868fafe41aa2338fa4 100644 (file)
@@ -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)
index 410cab7073a9a6ef926968bd365c2388f1e33f76..2b86a21e472deda0ed55120b0084f8f57135fadf 100644 (file)
@@ -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)
index fa4bf9d700f350e80823a36b3e9921f2d1805174..6d285ca070bd5b19933ee1d3d614c2de7da64786 100644 (file)
@@ -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;
         }
 
index 5f39e489f0b6541cfa799b1a8325287c4ceef6d8..2922b7d3924d83ebd819277969dc3c61c965bfb4 100644 (file)
@@ -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)