]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-ebpf: discard flow if no Flow storage
authorEric Leblond <eric@regit.org>
Fri, 31 May 2019 10:58:50 +0000 (12:58 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
src/util-ebpf.c

index ac15f2b2c0dc16575ceffab5b49597bb5b7fa0df..da9ad75195e0f2c629f1200a5d187cdb5ebd25dc 100644 (file)
@@ -539,7 +539,8 @@ static int EBPFUpdateFlowForKey(struct flows_stats *flowstats, FlowKey *flow_key
         FlowCounters *fc = FlowGetStorageById(f, GetFlowBypassCounterID());
         if (fc == NULL) {
             FLOWLOCK_UNLOCK(f);
-            return 0;
+            flowstats->count++;
+            return pkts_cnt;
         }
         if (flow_key->sp == f->sp) {
             if (pkts_cnt != fc->todstpktcnt) {