From: Steven Baigal (sbaigal) Date: Fri, 9 Jun 2023 15:05:48 +0000 (+0000) Subject: Pull request #3867: stream ip: Fix session counters in timeout and cleanup cases X-Git-Tag: 3.1.64.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=948fb99840492d9641376ef53c54ca117482789a;p=thirdparty%2Fsnort3.git Pull request #3867: stream ip: Fix session counters in timeout and cleanup cases Merge in SNORT/snort3 from ~CHSHERWI/snort3:ip_counters2 to master Squashed commit of the following: commit 744d42e3c0424f5b49f76ce9b7e30a136fd1f1ed Author: Chris Sherwin Date: Mon Jun 5 10:54:04 2023 -0400 stream ip: Fix session counters in timeout and cleanup cases --- diff --git a/src/stream/ip/ip_session.cc b/src/stream/ip/ip_session.cc index 2bf51536c..d9034e40c 100644 --- a/src/stream/ip/ip_session.cc +++ b/src/stream/ip/ip_session.cc @@ -79,7 +79,9 @@ static void IpSessionCleanup(Flow* lws, FragTracker* tracker) d->cleanup(tracker); } - ip_stats.released++; + if ( lws->ssn_state.session_flags & SSNFLAG_SEEN_SENDER ) + ip_stats.released++; + lws->restart(); } @@ -178,6 +180,7 @@ int IpSession::process(Packet* p) { ip_stats.timeouts++; IpSessionCleanup(flow, &tracker); + ip_stats.created++; #ifdef ENABLE_EXPECTED_IP if ( Stream::expected_flow(flow, p) )