From ed7d632cfc571ebb7bd591ffb2cfc591dd0a93e1 Mon Sep 17 00:00:00 2001 From: "Steve Chew (stechew)" Date: Wed, 25 Sep 2019 15:00:56 -0400 Subject: [PATCH] Merge pull request #1765 in SNORT/snort3 from ~STECHEW/snort3:analyzer_pkth to master Squashed commit of the following: commit d4054d8a659c22f5b66bf4b887e7f9812838540d Author: Steve Chew Date: Tue Sep 24 10:35:09 2019 -0400 analyzer: Move setting pkth to nullptr to after publishing finalize event. --- src/main/analyzer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/analyzer.cc b/src/main/analyzer.cc index 9995c3502..350b95c19 100644 --- a/src/main/analyzer.cc +++ b/src/main/analyzer.cc @@ -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(); } -- 2.47.3