]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: fix spare sync incomplete counter
authorVictor Julien <victor@inliniac.net>
Tue, 25 Aug 2020 09:40:50 +0000 (11:40 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Aug 2020 09:40:50 +0000 (11:40 +0200)
src/flow-hash.c

index 6397a0801880e65a853666be44f4c64bef2db4a7..1a92f604d10d333be26be977646b17dd9cbc9652 100644 (file)
@@ -512,10 +512,11 @@ static inline Flow *FlowSpareSync(ThreadVars *tv, FlowLookupStruct *fls,
         if (spare_sync) {
             if (f != NULL) {
                 StatsAddUI64(tv, fls->dtv->counter_flow_spare_sync_avg, fls->spare_queue.len+1);
-            } else if (f == NULL && fls->spare_queue.len == 0) {
+                if (fls->spare_queue.len < 99) {
+                    StatsIncr(tv, fls->dtv->counter_flow_spare_sync_incomplete);
+                }
+            } else if (fls->spare_queue.len == 0) {
                 StatsIncr(tv, fls->dtv->counter_flow_spare_sync_empty);
-            } else if (f != NULL && fls->spare_queue.len < 99) {
-                StatsIncr(tv, fls->dtv->counter_flow_spare_sync_incomplete);
             }
             StatsIncr(tv, fls->dtv->counter_flow_spare_sync);
         }