From b31278b7cda764e257ea3bad58f1da5eb8f8f528 Mon Sep 17 00:00:00 2001 From: yangwei Date: Fri, 14 Apr 2023 15:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor(scan=20log):=20?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E7=BB=93=E6=9E=9C=E6=97=A5=E5=BF=97=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=86=99=E5=85=A5g=5Ftsg=5Fmaat=5Frt=5Fpara=E5=8F=A5?= =?UTF-8?q?=E6=9F=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_rule.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 6fb64b4..fc0a381 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -2320,23 +2320,23 @@ size_t tsg_scan_ipv4_address(const struct streaminfo *a_stream, struct maat *fea if(n_matched_rules>0) { - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "SCAN_IPV4", "Hit %s addr: %s return n_rules: %llu", g_tsg_maat_rt_para.scan_tb[idx].name, - PRINTADDR(a_stream, g_tsg_para.level), + PRINTADDR(a_stream, g_tsg_maat_rt_para.level), n_matched_rules ); return matche_rules_convert(feather, matched_rules, n_matched_rules, rules, n_rules); } - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "SCAN_IPV4", "Not hit %s addr: %s Scan return: %d ", g_tsg_maat_rt_para.scan_tb[idx].name, - PRINTADDR(a_stream, g_tsg_para.level), + PRINTADDR(a_stream, g_tsg_maat_rt_para.level), is_hited ); @@ -2369,23 +2369,23 @@ size_t tsg_scan_ipv6_address(const struct streaminfo *a_stream, struct maat *fea if(n_matched_rules>0) { - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "SCAN_IPV6", "Hit %s addr: %s return n_rules: %llu", g_tsg_maat_rt_para.scan_tb[idx].name, - PRINTADDR(a_stream, g_tsg_para.level), + PRINTADDR(a_stream, g_tsg_maat_rt_para.level), n_matched_rules ); return matche_rules_convert(feather, matched_rules, n_matched_rules, rules, n_rules); } - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "SCAN_IPV6", "Not hit %s addr: %s Scan return: %d ", g_tsg_maat_rt_para.scan_tb[idx].name, - PRINTADDR(a_stream, g_tsg_para.level), + PRINTADDR(a_stream, g_tsg_maat_rt_para.level), is_hited ); @@ -2443,7 +2443,7 @@ int tsg_scan_intercept_exclusion(const struct streaminfo *a_stream, struct maat if(ret>0) { - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "EXCLUSION_SSL_SNI", "Hit %s policy_id: %d service: %d action: %d Decryption Exclusion: [ policy_id: %d service: %d action: %d ] addr: %s", @@ -2454,19 +2454,19 @@ int tsg_scan_intercept_exclusion(const struct streaminfo *a_stream, struct maat p_result->rule_id, p_result->service_id, (unsigned char)p_result->action, - PRINTADDR(a_stream, g_tsg_para.level) + PRINTADDR(a_stream, g_tsg_maat_rt_para.level) ); return 1; } - MESA_handle_runtime_log(g_tsg_para.logger, + MESA_handle_runtime_log(g_tsg_maat_rt_para.logger, RLOG_LV_DEBUG, "EXCLUSION_SSL_SNI", "Not hit %s stream_dir: %d addr: %s scan ret: %d", domain, a_stream->dir, - PRINTADDR(a_stream, g_tsg_para.level), + PRINTADDR(a_stream, g_tsg_maat_rt_para.level), ret );