You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ro...@apache.org on 2021/09/15 17:04:59 UTC
[trafficcontrol] branch master updated: Add a status set to
forbidden and event error to try to stop the SM from handling blocked IPs
(#6214)
This is an automated email from the ASF dual-hosted git repository.
rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 8895161 Add a status set to forbidden and event error to try to stop the SM from handling blocked IPs (#6214)
8895161 is described below
commit 889516123a95ed1612fb29e6f4c7eacf06f7cca9
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Wed Sep 15 11:04:50 2021 -0600
Add a status set to forbidden and event error to try to stop the SM from handling blocked IPs (#6214)
---
traffic_server/plugins/astats_over_http/astats_over_http.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.c b/traffic_server/plugins/astats_over_http/astats_over_http.c
index df3adec..a538344 100644
--- a/traffic_server/plugins/astats_over_http/astats_over_http.c
+++ b/traffic_server/plugins/astats_over_http/astats_over_http.c
@@ -541,6 +541,8 @@ static int astats_origin(TSCont cont, TSEvent event, void *edata) {
const struct sockaddr *addr = TSHttpTxnClientAddrGet(txnp);
if(!is_ip_allowed(config, addr)) {
TSDebug(PLUGIN_TAG, "not right ip");
+ TSHttpTxnStatusSet(txnp, TS_HTTP_STATUS_FORBIDDEN);
+ reenable = TS_EVENT_HTTP_ERROR;
goto notforme;
}