]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: fix a debug assert
authorEric Leblond <el@stamus-networks.com>
Sun, 15 Aug 2021 10:17:23 +0000 (12:17 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 1 Sep 2021 06:33:52 +0000 (08:33 +0200)
As the FlowBypassedTimeout function is interacting with the capture
method it is possible that the return changes between the call that
did trigger the timeout and the actual state (ie if packets arrive
in between the two calls). So we should not use the call to
FlowBypassedTimeout in the assert.

src/flow-manager.c

index 2abc8c817f22fe588da241babce717801a7f501d..2bbd3968fee7356f3eaa0cb2074a591eb3a16fde 100644 (file)
@@ -440,7 +440,7 @@ static void FlowManagerHashRowClearEvictedList(FlowManagerTimeoutThread *td,
         f->next = NULL;
         f->fb = NULL;
 
-        DEBUG_VALIDATE_BUG_ON(f->use_cnt > 0 || !FlowBypassedTimeout(f, ts, counters));
+        DEBUG_VALIDATE_BUG_ON(f->use_cnt > 0);
 
         FlowQueuePrivateAppendFlow(&td->aside_queue, f);
         /* flow is still locked in the queue */