]> 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 10:21:11 +0000 (12:21 +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.

(cherry picked from commit cce7e4f4cb28485f2e43630b4baf7a77449af707)

src/flow-manager.c

index 24d632d4ee63edcd26a0eb3d266f4af59732a2b0..f215ed245bdfe2c410be18f5710639bc7e48bea8 100644 (file)
@@ -430,7 +430,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 */