]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/manager: fix management tasks not running
authorVictor Julien <victor@inliniac.net>
Thu, 28 May 2020 06:33:57 +0000 (08:33 +0200)
committerVictor Julien <victor@inliniac.net>
Sun, 31 May 2020 04:17:52 +0000 (06:17 +0200)
Fix tasks not running on the first manager, even if there is just
a single manager.

src/flow-manager.c

index 150f30144e2a34aa21344894f054ad7c40a6f06e..3b3aa3b58a68116997163823f201074580f99a64 100644 (file)
@@ -769,7 +769,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
         SCLogDebug("ts %" PRIdMAX "", (intmax_t)ts.tv_sec);
 
         /* see if we still have enough spare flows */
-        if (ftd->instance == 1)
+        if (ftd->instance == 0)
             FlowUpdateSpareFlows();
 
         /* try to time out flows */
@@ -777,7 +777,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
         FlowTimeoutHash(&ts, 0 /* check all */, ftd->min, ftd->max, &counters);
 
 
-        if (ftd->instance == 1) {
+        if (ftd->instance == 0) {
             DefragTimeoutHash(&ts);
             //uint32_t hosts_pruned =
             HostTimeoutHash(&ts);