From: George Koikara (gkoikara) Date: Fri, 5 Jul 2019 04:40:20 +0000 (-0400) Subject: Merge pull request #1623 in SNORT/snort3 from ~VIGNVISW/snort3:vignvisw_eof to master X-Git-Tag: 3.0.0-258~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7697195ee18d3c21a8c549b3a3a6fc79c1e6cb4d;p=thirdparty%2Fsnort3.git Merge pull request #1623 in SNORT/snort3 from ~VIGNVISW/snort3:vignvisw_eof to master Squashed commit of the following: commit af18eb5c0005d65a1c4879d74dbfa80f736e81b8 Author: Vigneshwari Viswanathan Date: Fri May 17 07:01:05 2019 -0400 stream: add convenient method for flow deletion --- diff --git a/src/stream/stream.cc b/src/stream/stream.cc index 3ca0d7234..405b941f5 100644 --- a/src/stream/stream.cc +++ b/src/stream/stream.cc @@ -76,6 +76,11 @@ Flow* Stream::new_flow(const FlowKey* key) void Stream::delete_flow(const FlowKey* key) { flow_con->delete_flow(key); } +void Stream::delete_flow(Flow* flow) +{ + flow_con->delete_flow(flow, PruneReason::NONE); +} + //------------------------------------------------------------------------- // key foo //------------------------------------------------------------------------- diff --git a/src/stream/stream.h b/src/stream/stream.h index be66d1794..4168f4d18 100644 --- a/src/stream/stream.h +++ b/src/stream/stream.h @@ -90,6 +90,7 @@ public: // Removes the flow session object from the flow cache table and returns // the resources allocated to that flow to the free list. static void delete_flow(const FlowKey*); + static void delete_flow(Flow*); // Examines the source and destination ip addresses and ports to determine if the // packet is from the client or server side of the flow and sets bits in the