From: Victor Julien Date: Mon, 25 Oct 2021 20:12:01 +0000 (+0200) Subject: flow/manager: remove obsolete code X-Git-Tag: suricata-6.0.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d18e3cac7c97dd101a6786a8b3cb7a5938ab5d4;p=thirdparty%2Fsuricata.git flow/manager: remove obsolete code (cherry picked from commit 41fee417229feed7636f95acb3c3d7309b9d3122) --- diff --git a/src/flow-manager.c b/src/flow-manager.c index e0adc83c5e..cea12a0fa7 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -254,50 +254,6 @@ static inline int FlowBypassedTimeout(Flow *f, struct timeval *ts, return 1; } -/** \internal - * \brief See if we can really discard this flow. Check use_cnt reference - * counter and force reassembly if necessary. - * - * \param f flow - * \param ts timestamp - * - * \retval 0 not timed out just yet - * \retval 1 fully timed out, lets kill it - */ -#if 0 -static inline int FlowManagerFlowTimedOut(Flow *f, struct timeval *ts, - FlowTimeoutCounters *counters) -{ - /* never prune a flow that is used by a packet we - * are currently processing in one of the threads */ - if (f->use_cnt > 0) { - return 0; - } - - if (!FlowBypassedTimeout(f, ts, counters)) { - return 0; - } - - int server = 0, client = 0; - - if (!(f->flags & FLOW_TIMEOUT_REASSEMBLY_DONE) && -#ifdef CAPTURE_OFFLOAD - f->flow_state != FLOW_STATE_CAPTURE_BYPASSED && -#endif - f->flow_state != FLOW_STATE_LOCAL_BYPASSED && - FlowForceReassemblyNeedReassembly(f, &server, &client) == 1) { - FlowForceReassemblyForFlow(f, server, client); - return 0; - } -#ifdef DEBUG - /* this should not be possible */ - BUG_ON(f->use_cnt > 0); -#endif - - return 1; -} -#endif - static inline int FMTryLockBucket(FlowBucket *fb) { int r = FBLOCK_TRYLOCK(fb);