From: Eduard Bagdasaryan Date: Wed, 25 Oct 2017 14:57:06 +0000 (+0300) Subject: Improved allow_t::someRuleMatched() API. No functionality changes. (#75) X-Git-Tag: M-staged-PR71~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b537f95f7c9f4d80cb1465e737d645b97a88297;p=thirdparty%2Fsquid.git Improved allow_t::someRuleMatched() API. No functionality changes. (#75) --- diff --git a/src/acl/Acl.h b/src/acl/Acl.h index 57300d6c87..5b6afb728f 100644 --- a/src/acl/Acl.h +++ b/src/acl/Acl.h @@ -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 diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 021e9907b9..ef9fb34cd9 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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 ); }