From: Eric Leblond Date: Sun, 15 Aug 2021 10:17:23 +0000 (+0200) Subject: flow: fix a debug assert X-Git-Tag: suricata-6.0.4~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2377666dd512cc76a52e21e4bce6a5148f658c22;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. (cherry picked from commit cce7e4f4cb28485f2e43630b4baf7a77449af707) --- diff --git a/src/flow-manager.c b/src/flow-manager.c index 24d632d4ee..f215ed245b 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -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 */