]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threads: use sleeping threads for minimum time a bit longer
authorVictor Julien <vjulien@oisf.net>
Wed, 18 Sep 2024 10:21:42 +0000 (12:21 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2025 08:16:36 +0000 (09:16 +0100)
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.

src/tm-threads.c

index 11199bc130bf6962479246a16c4b4824b93d074c..380a6a17a70b25a4d27d0bdcb050d268d4c551fa 100644 (file)
@@ -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;