From: Victor Julien Date: Wed, 18 Sep 2024 10:21:42 +0000 (+0200) Subject: threads: use sleeping threads for minimum time a bit longer X-Git-Tag: suricata-8.0.0-beta1~591 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0da83b05cf1972385b457b824ebfa3eef85329b0;p=thirdparty%2Fsuricata.git threads: use sleeping threads for minimum time a bit longer If a thread doesn't receive packets for a while the packet timestamp will no longer be used to determine a reasonable minimum timestamp for flow timeout handling. To avoid issues with the minimum timestamp to be set a bit too aggressively, increase the time a thread can be inactive. --- diff --git a/src/tm-threads.c b/src/tm-threads.c index 11199bc130..380a6a17a7 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -2272,7 +2272,7 @@ void TmThreadsGetMinimalTimestamp(struct timeval *ts) if (t->type != TVT_PPT) continue; if (SCTIME_CMP_NEQ(t->pktts, nullts)) { - SCTime_t sys_sec_stamp = SCTIME_ADD_SECS(t->sys_sec_stamp, 1); + SCTime_t sys_sec_stamp = SCTIME_ADD_SECS(t->sys_sec_stamp, 5); /* ignore sleeping threads */ if (SCTIME_CMP_LT(sys_sec_stamp, now)) continue;