From: Yehor Velykozhon -X (yvelykoz - SOFTSERVE INC at Cisco) Date: Fri, 5 Jul 2024 18:55:14 +0000 (+0000) Subject: Pull request #4376: detection: include OPT_TREE traces in release build X-Git-Tag: 3.3.1.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8566445ae858317d94d3475fd980eead40996ee0;p=thirdparty%2Fsnort3.git Pull request #4376: detection: include OPT_TREE traces in release build Merge in SNORT/snort3 from ~YVELYKOZ/snort3:fix_traces to master Squashed commit of the following: commit ca98db474d16d2c4cfbdd0a1274bfaa82b20bb4e Author: Yehor Velykozhon Date: Fri Jul 5 16:31:31 2024 +0300 detection: include OPT_TREE traces in release build --- diff --git a/src/detection/detect_trace.h b/src/detection/detect_trace.h index 1e3817e08..d4cc7ba5f 100644 --- a/src/detection/detect_trace.h +++ b/src/detection/detect_trace.h @@ -39,16 +39,16 @@ struct PatternMatchData; enum { - TRACE_DETECTION_ENGINE = 0, + TRACE_OPTION_TREE = 0, + TRACE_FP_INFO, + TRACE_DETECTION_ENGINE, TRACE_RULE_EVAL, TRACE_BUFFER, TRACE_RULE_VARS, TRACE_FP_SEARCH, TRACE_PKT_DETECTION, - TRACE_OPTION_TREE, TRACE_TAG, TRACE_CONT, - TRACE_FP_INFO, }; void clear_trace_cursor_info(); diff --git a/src/detection/detection_module.cc b/src/detection/detection_module.cc index 6d8afaf2b..23eb5b213 100644 --- a/src/detection/detection_module.cc +++ b/src/detection/detection_module.cc @@ -41,6 +41,8 @@ THREAD_LOCAL const Trace* detection_trace = nullptr; static const TraceOption detection_trace_options[] = { + { "opt_tree", TRACE_OPTION_TREE, "enable tree option trace logging" }, + { "fp_info", TRACE_FP_INFO, "enable fast pattern info logging" }, #ifdef DEBUG_MSGS { "detect_engine", TRACE_DETECTION_ENGINE, "enable detection engine trace logging" }, { "rule_eval", TRACE_RULE_EVAL, "enable rule evaluation trace logging" }, @@ -48,11 +50,9 @@ static const TraceOption detection_trace_options[] = { "rule_vars", TRACE_RULE_VARS, "enable rule variables trace logging" }, { "fp_search", TRACE_FP_SEARCH, "enable fast pattern search trace logging" }, { "pkt_detect", TRACE_PKT_DETECTION, "enable packet detection trace logging" }, - { "opt_tree", TRACE_OPTION_TREE, "enable tree option trace logging" }, { "tag", TRACE_TAG, "enable tag trace logging" }, { "cont", TRACE_CONT, "enable rule continuation trace logging" }, #endif - { "fp_info", TRACE_FP_INFO, "enable fast pattern info logging" }, { nullptr, 0, nullptr } };