From af6daceeda128296cfc075b39b411c696a1cbce7 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 4 Jun 2019 13:49:32 +0200 Subject: [PATCH] util-ebpf: more useful error message At the time of the writing, libbpf output useful error message on strdout only and errno is not really interesting. So let's tell user to look at stdout. --- src/util-ebpf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/util-ebpf.c b/src/util-ebpf.c index eb68c158e1..c14e82546a 100644 --- a/src/util-ebpf.c +++ b/src/util-ebpf.c @@ -387,11 +387,9 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section, err = bpf_object__load(bpfobj); if (err < 0) { if (err == -EPERM) { - SCLogError(SC_ERR_MEM_ALLOC, - "Permission issue when loading eBPF object: " - "%s (%d)", - strerror(err), - err); + SCLogError(SC_ERR_SYSCALL, + "Permission issue when loading eBPF object" + " (check libbpf error on stdout)"); } else { char buf[129]; libbpf_strerror(err, buf, sizeof(buf)); -- 2.47.2