From: Naveen Gujje (ngujje) Date: Tue, 13 Oct 2020 06:43:03 +0000 (+0000) Subject: Merge pull request #2492 in SNORT/snort3 from ~KBHANDAN/snort3:whd to master X-Git-Tag: 3.0.3-3~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf44e7ac909345aa3365a827e30c5544d1930b6;p=thirdparty%2Fsnort3.git Merge pull request #2492 in SNORT/snort3 from ~KBHANDAN/snort3:whd to master Squashed commit of the following: commit 7cebab7b8118ab1539a7b1845f2d4b53ad2b74e8 Author: Kaushal Bhandankar Date: Sun Sep 20 18:36:46 2020 -0400 flow: stale and deleted flows due to EOF should generate would have dropped event --- diff --git a/src/flow/flow_control.cc b/src/flow/flow_control.cc index 5d25aa03d..9157b03f4 100644 --- a/src/flow/flow_control.cc +++ b/src/flow/flow_control.cc @@ -139,6 +139,8 @@ Flow* FlowControl::stale_flow_cleanup(FlowCache* cache, Flow* flow, Packet* p) { if ( p->pkth->flags & DAQ_PKT_FLAG_NEW_FLOW ) { + ActiveSuspendContext act_susp(Active::ASP_TIMEOUT); + if (PacketTracer::is_active()) PacketTracer::log("Session: deleting snort session, reason: stale and not cleaned \n"); diff --git a/src/packet_io/active.h b/src/packet_io/active.h index 69e6c2f30..20cd1facc 100644 --- a/src/packet_io/active.h +++ b/src/packet_io/active.h @@ -229,7 +229,7 @@ private: ActiveAction* delayed_reject; // set with set_delayed_action() }; -struct ActiveSuspendContext +struct SO_PUBLIC ActiveSuspendContext { ActiveSuspendContext(Active::ActiveSuspendReason suspend_reason) { Active::suspend(suspend_reason); }