From: Russ Combs (rucombs) Date: Thu, 5 Dec 2019 05:45:05 +0000 (+0000) Subject: Merge pull request #1853 in SNORT/snort3 from ~RUCOMBS/snort3:empty_rule_state_table... X-Git-Tag: 3.0.0-267~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68fc38b519ca6c007c287d5651c20d421417a99d;p=thirdparty%2Fsnort3.git Merge pull request #1853 in SNORT/snort3 from ~RUCOMBS/snort3:empty_rule_state_table to master Squashed commit of the following: commit 6bfb8eddcf1ba0cc23fbf4b42b3d9229bc506748 Author: russ Date: Wed Nov 20 15:43:23 2019 -0500 rule_state: allow empty tables --- diff --git a/src/main/modules.cc b/src/main/modules.cc index f033f2bb7..352aec447 100644 --- a/src/main/modules.cc +++ b/src/main/modules.cc @@ -1935,8 +1935,11 @@ bool RuleStateModule::begin(const char*, int, SnortConfig* sc) return true; } -bool RuleStateModule::end(const char*, int, SnortConfig* sc) +bool RuleStateModule::end(const char* fqn, int, SnortConfig* sc) { + if ( !strcmp(fqn, "rule_state") ) + return true; + if ( !key.gid or !key.sid ) return false;