]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-ebpf: suppress call on loop init
authorEric Leblond <eric@regit.org>
Sun, 12 Nov 2017 14:53:39 +0000 (15:53 +0100)
committerEric Leblond <eric@regit.org>
Tue, 6 Feb 2018 15:58:18 +0000 (16:58 +0100)
src/util-ebpf.c

index 0a148e72dc40fab8006ba6b450747b15f638f2c7..352f169cdd9bc874c8297ca774d2f5e91a988a7f 100644 (file)
@@ -218,9 +218,6 @@ int EBPFForEachFlowV4Table(const char *name,
     }
     struct pair values_array[nr_cpus];
 
-    if (bpf_map_get_next_key(mapfd, &key, &next_key) != 0) {
-        return found;
-    }
     while (bpf_map_get_next_key(mapfd, &key, &next_key) == 0) {
         int iret = 1;
         int pkts_cnt = 0;
@@ -266,9 +263,6 @@ int EBPFForEachFlowV6Table(const char *name,
     }
     struct pair values_array[nr_cpus];
 
-    if (bpf_map_get_next_key(mapfd, &key, &next_key) != 0) {
-        return found;
-    }
     while (bpf_map_get_next_key(mapfd, &key, &next_key) == 0) {
         int iret = 1;
         int pkts_cnt = 0;