]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4051: detection: always clear rule profiling stats for all nodes
authorAndrii Serbeniuk -X (aserbeni - SOFTSERVE INC at Cisco) <aserbeni@cisco.com>
Fri, 13 Oct 2023 14:15:27 +0000 (14:15 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 13 Oct 2023 14:15:27 +0000 (14:15 +0000)
Merge in SNORT/snort3 from ~ASERBENI/snort3:ruleprof_stats to master

Squashed commit of the following:

commit 6a7f93962b14b5675e36373f65fa1869e30e9577
Author: Andrii Serbeniuk <aserbeni@cisco.com>
Date:   Thu Oct 12 12:29:58 2023 +0300

    detection: fix cleaning of rule profiling stats when profiling starts

src/detection/detection_options.cc

index a2a9a3f951989ae02c1e2e563fa31f7c28f919f2..eaa8053190e13464414b2f28cf4416e2c0309f6d 100644 (file)
@@ -827,8 +827,7 @@ void detection_option_tree_reset_otn_stats(std::vector<HashNode*>& nodes, unsign
         auto* node = (detection_option_tree_node_t*)hnode->data;
         assert(node);
 
-        if ( node->state[thread_id].checks )
-            detection_option_node_reset_otn_stats(node, thread_id);
+        detection_option_node_reset_otn_stats(node, thread_id);
     }
 }