]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Improved allow_t::someRuleMatched() API. No functionality changes. (#75)
authorEduard Bagdasaryan <dictiano@gmail.com>
Wed, 25 Oct 2017 14:57:06 +0000 (17:57 +0300)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 25 Oct 2017 14:57:06 +0000 (08:57 -0600)
src/acl/Acl.h
src/client_side_request.cc

index 57300d6c873a424a16823b4d60a238c41c3aadbc..5b6afb728f60fefaa724dffbf807cb4c6842c24f 100644 (file)
@@ -146,9 +146,8 @@ public:
     /// See also: allowed().
     bool denied() const { return code == ACCESS_DENIED; }
 
-    /// whether there was either a default rule, a rule without any ACLs, or a
-    /// a rule with ACLs that all matched
-    bool someRuleMatched() const { return allowed() || denied(); }
+    /// whether Squid is uncertain about the allowed() or denied() answer
+    bool conflicted() const { return !allowed() && !denied(); }
 
     aclMatchCode code; ///< ACCESS_* code
     int kind; ///< which custom access list verb matched
index 021e9907b969fae452967976d91b70a72f1b93cb..ef9fb34cd9efe04574076d6e393230e1030125cf 100644 (file)
@@ -506,7 +506,7 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
     request->x_forwarded_for_iterator.clean();
     request->flags.done_follow_x_forwarded_for = true;
 
-    if (!answer.someRuleMatched()) {
+    if (answer.conflicted()) {
         debugs(28, DBG_CRITICAL, "ERROR: Processing X-Forwarded-For. Stopping at IP address: " << request->indirect_client_addr );
     }