From dda96c9fb41aa7c3c9dd4bf617cc5eaca62a6dd4 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Mon, 27 Mar 2023 11:28:32 +0800 Subject: TSG-14421: 策略失效后获取user_region为空,返回值为1导致策略执行方向不正确 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_rule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 06b835b..a28084f 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -3496,7 +3496,7 @@ int tsg_is_do_deny_action_by_enforce_direction(const struct streaminfo *a_stream struct compile_user_region *user_region=(struct compile_user_region *)Maat_rule_get_ex_data(g_tsg_maat_feather, p_result, g_tsg_para.table_id[TABLE_SECURITY_COMPILE]); if(user_region==NULL) { - return 1; + return 0; } if((user_region->method_type==TSG_METHOD_TYPE_DROP || user_region->method_type==TSG_METHOD_TYPE_RATE_LIMIT) && user_region->deny!=NULL) -- cgit v1.2.3