Merge in SNORT/snort3 from ~VCHYZHOV/snort3:fix_pcre_rule_counts to master
Squashed commit of the following:
commit
00454f429eca1af4d67d1ef6e4981d1d8814f30d
Author: Viktor Chyzhovych <vchyzhov@cisco.com>
Date: Wed Dec 17 14:57:28 2025 +0200
ips_options: reset PCRE rule counts on new configuration loaded
};
PcreCounts pcre_counts;
+static const SnortConfig* pcre_counts_config_generation = nullptr;
void show_pcre_counts()
{
bool PcreModule::set(const char* name, Value& v, SnortConfig* sc)
{
+ // Reset PCRE counters once per new configuration build
+ if (sc != pcre_counts_config_generation)
+ {
+ pcre_counts = {};
+ pcre_counts_config_generation = sc;
+ }
+
assert(v.is("~re"));
re = v.get_string();