]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-ebpf: add message if key deletion fails
authorEric Leblond <eric@regit.org>
Tue, 5 Mar 2019 21:09:29 +0000 (22:09 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
src/util-ebpf.c

index 8928aa1330da141e7795a0f39756e04cbebd9144..011c9be1a091219663efe3c74ad45c0963514f8c 100644 (file)
@@ -115,7 +115,12 @@ static void BypassedListFree(void *ifl)
 
 static void EBPFDeleteKey(int fd, void *key)
 {
-    bpf_map_delete_elem(fd, key);
+    int ret = bpf_map_delete_elem(fd, key);
+    if (ret < 0) {
+        SCLogNotice("Unable to delete entry: %s (%d)",
+                    strerror(errno),
+                    errno);
+    }
 }
 
 static struct bpf_maps_info *EBPFGetBpfMap(const char *iface)