]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1765 in SNORT/snort3 from ~STECHEW/snort3:analyzer_pkth to master
authorSteve Chew (stechew) <stechew@cisco.com>
Wed, 25 Sep 2019 19:00:56 +0000 (15:00 -0400)
committerSteve Chew (stechew) <stechew@cisco.com>
Wed, 25 Sep 2019 19:00:56 +0000 (15:00 -0400)
Squashed commit of the following:

commit d4054d8a659c22f5b66bf4b887e7f9812838540d
Author: Steve Chew <stechew@cisco.com>
Date:   Tue Sep 24 10:35:09 2019 -0400

    analyzer: Move setting pkth to nullptr to after publishing finalize event.

src/main/analyzer.cc

index 9995c35027bd7cd99d3a8f89e33915e68dea44bc..350b95c19f1ea217e7df2af95eefba8ef1536f6f 100644 (file)
@@ -310,8 +310,6 @@ void Analyzer::post_process_daq_pkt_msg(Packet* p)
 
     HighAvailabilityManager::process_update(p->flow, p);
 
-    p->pkth = nullptr;  // no longer avail upon sig segv
-
     if (verdict != MAX_DAQ_VERDICT)
     {
         // Publish an event if something has indicated that it wants the
@@ -321,6 +319,9 @@ void Analyzer::post_process_daq_pkt_msg(Packet* p)
             FinalizePacketEvent event(p, verdict);
             DataBus::publish(FINALIZE_PACKET_EVENT, event);
         }
+
+        p->pkth = nullptr;  // No longer avail after finalize_message.
+
         {
             Profile profile(daqPerfStats);
             p->daq_instance->finalize_message(p->daq_msg, verdict);
@@ -359,6 +360,7 @@ void Analyzer::process_daq_pkt_msg(DAQ_Msg_h msg, bool retry)
         switcher->stop();
     }
 
+    oops_handler->set_current_packet(nullptr);
     Stream::timeout_flows(packet_time());
     HighAvailabilityManager::process_receive();
 }