From 44566e5a24a103581aec80b1d02a0b71c74fd1eb Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 4 Jun 2019 16:22:52 +0200 Subject: [PATCH] ebpf: only display that file is loaded if we do it --- src/runmode-af-packet.c | 2 -- src/util-ebpf.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index e499267920..09d8310175 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -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; diff --git a/src/util-ebpf.c b/src/util-ebpf.c index c14e82546a..9185d80e70 100644 --- a/src/util-ebpf.c +++ b/src/util-ebpf.c @@ -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; }