]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3599: detection: refactor set next packet to use the dummy active objec...
authorRon Dempster (rdempste) <rdempste@cisco.com>
Fri, 30 Sep 2022 22:28:10 +0000 (22:28 +0000)
committerRon Dempster (rdempste) <rdempste@cisco.com>
Fri, 30 Sep 2022 22:28:10 +0000 (22:28 +0000)
Merge in SNORT/snort3 from ~RDEMPSTE/snort3:flush_active to master

Squashed commit of the following:

commit e9c711082f06c49a1859fb4adcd4eb35831dc30d
Author: Ron Dempster (rdempste) <rdempste@cisco.com>
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

src/detection/detection_engine.cc

index e81bc97c7b4c78008ba8295bfcc7074ddced497e..eeea781642ac77570f75f55db3ec90fd99d67b7c 100644 (file)
@@ -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
     {