cmcfarlen commented on code in PR #9845:
URL: https://github.com/apache/trafficserver/pull/9845#discussion_r1230231443
##########
proxy/http/HttpSM.cc:
##########
@@ -5261,29 +5261,29 @@ HttpSM::get_outbound_sni() const
bool
HttpSM::apply_ip_allow_filter()
{
+ bool result{true};
// Method allowed on dest IP address check
IpAllow::ACL acl = IpAllow::match(server_ip(), IpAllow::DST_ADDR);
if (ip_allow_is_request_forbidden(acl)) {
ip_allow_deny_request(acl);
- return false;
- }
-
- if (HttpTransact::is_server_negative_cached(&t_state) == true &&
- t_state.txn_conf->connect_attempts_max_retries_down_server <= 0) {
+ result = false;
+ } else if (HttpTransact::is_server_negative_cached(&t_state) == true &&
+ t_state.txn_conf->connect_attempts_max_retries_down_server <= 0) {
call_transact_and_set_next_state(HttpTransact::OriginDown);
- return false;
+ result = false;
}
- return true;
+ return result;
}
bool
HttpSM::ip_allow_is_request_forbidden(const IpAllow::ACL &acl)
{
+ bool result{false};
if (acl.isValid()) {
if (acl.isDenyAll()) {
- return true;
+ result = true;
} else if (!acl.isAllowAll()) {
if (method() != -1) {
return !acl.isMethodAllowed(method());
Review Comment:
`result =`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]