]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/manager: remove obsolete code
authorVictor Julien <victor@inliniac.net>
Mon, 25 Oct 2021 20:12:01 +0000 (22:12 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 12 Nov 2021 05:54:44 +0000 (06:54 +0100)
(cherry picked from commit 41fee417229feed7636f95acb3c3d7309b9d3122)

src/flow-manager.c

index e0adc83c5ec8e69ba745864e4a748c5227d12763..cea12a0fa749f346fb8ce50133d173bfb369e689 100644 (file)
@@ -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);