]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ebpf: only display that file is loaded if we do it
authorEric Leblond <eric@regit.org>
Tue, 4 Jun 2019 14:22:52 +0000 (16:22 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
src/runmode-af-packet.c
src/util-ebpf.c

index e49926792017df4402d6e21489b8b6ed84359019..09d8310175b54ec0933d30f55460522bc7cfd24c 100644 (file)
@@ -475,8 +475,6 @@ static void *ParseAFPConfig(const char *iface)
         aconf->xdp_filter_file = NULL;
     } else {
 #ifdef HAVE_PACKET_XDP
-        SCLogInfo("af-packet will use '%s' as XDP filter file",
-                  ebpf_file);
         aconf->ebpf_t_config.mode = AFP_MODE_XDP_BYPASS;
         aconf->ebpf_t_config.flags |= EBPF_XDP_CODE;
         aconf->xdp_filter_file = ebpf_file;
index c14e82546a272874b8e18467aa446318b37fbf81..9185d80e701d307cc1a941960d6e8d0eeb63ad35 100644 (file)
@@ -321,6 +321,7 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section,
     if (config->flags & EBPF_XDP_CODE && config->flags & EBPF_PINNED_MAPS) {
         /* We try to get our flow table maps and if we have them we can simply return */
         if (EBPFLoadPinnedMaps(livedev, config) == 0) {
+            SCLogInfo("Loaded pinned maps, will use already loaded eBPF filter");
             return 1;
         }
     }
@@ -461,6 +462,7 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section,
         return -1;
     }
 
+    SCLogInfo("Successfully loaded eBPF file '%s' on '%s'", path, iface);
     *val = pfd;
     return 0;
 }