From: Ron Dempster (rdempste) Date: Fri, 30 Sep 2022 22:28:10 +0000 (+0000) Subject: Pull request #3599: detection: refactor set next packet to use the dummy active objec... X-Git-Tag: 3.1.43.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baf1e361bf1f66f0bb0f4497643e60f8c9a1cccf;p=thirdparty%2Fsnort3.git Pull request #3599: detection: refactor set next packet to use the dummy active object when there is no packet Merge in SNORT/snort3 from ~RDEMPSTE/snort3:flush_active to master Squashed commit of the following: commit e9c711082f06c49a1859fb4adcd4eb35831dc30d Author: Ron Dempster (rdempste) Date: Tue Sep 20 11:01:54 2022 -0400 detection: refactor set next packet to use the dummy active object when there is no packet --- diff --git a/src/detection/detection_engine.cc b/src/detection/detection_engine.cc index e81bc97c7..eeea78164 100644 --- a/src/detection/detection_engine.cc +++ b/src/detection/detection_engine.cc @@ -193,15 +193,7 @@ Packet* DetectionEngine::set_next_packet(const Packet* parent, Flow* flow) p->action = parent->action; } - // processing but parent is already gone (flow cache flush etc..) - else if ( Analyzer::get_switcher()->get_context() ) - { - p->daq_msg = nullptr; - p->daq_instance = nullptr; - p->active = get_current_packet()->active; - p->action = get_current_packet()->action; - } - + // processing but parent is already gone (flow cache flush etc..) or // shutdown, so use a dummy so null checking is not needed everywhere else {