From: Eric Leblond Date: Sun, 15 Aug 2021 10:17:23 +0000 (+0200) Subject: flow: fix a debug assert X-Git-Tag: suricata-7.0.0-beta1~1480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cce7e4f4cb28485f2e43630b4baf7a77449af707;p=thirdparty%2Fsuricata.git flow: fix a debug assert 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. --- diff --git a/src/flow-manager.c b/src/flow-manager.c index 2abc8c817f..2bbd3968fe 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -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 */