ebpf: only display that file is loaded if we do it

pull/3952/head
Eric Leblond 6 years ago committed by Victor Julien
parent 5e62ae6d28
commit 44566e5a24

@ -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;

@ -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;
}

Loading…
Cancel
Save