From: Oleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) Date: Fri, 1 Sep 2023 19:58:57 +0000 (+0000) Subject: Pull request #3981: detection: fix assert expression X-Git-Tag: 3.1.70.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=101a2de0dc4a49cb7b412524983c17f8d6bba264;p=thirdparty%2Fsnort3.git Pull request #3981: detection: fix assert expression Merge in SNORT/snort3 from ~OSHUMEIK/snort3:flowbit_assert to master Squashed commit of the following: commit f6ab7141e83a53ed630b50f9331d841ae60ce193 Author: Oleksii Shumeiko Date: Fri Sep 1 15:07:31 2023 +0300 detection: fix assert expression Flowbit setter can be evaluated against a packet without flow. IPS rule still matches. --- diff --git a/src/detection/detection_options.cc b/src/detection/detection_options.cc index 94b86c09c..a2a9a3f95 100644 --- a/src/detection/detection_options.cc +++ b/src/detection/detection_options.cc @@ -515,7 +515,7 @@ int detection_option_node_evaluate( { rval = node->evaluate(node->option_data, cursor, eval_data.p); assert((flowbits_setter(node->option_data) and rval == (int)IpsOption::MATCH) - or !flowbits_setter(node->option_data)); + or !flowbits_setter(node->option_data) or !eval_data.p->flow); } break;