From: Eric Leblond Date: Tue, 4 Jun 2019 11:49:32 +0000 (+0200) Subject: util-ebpf: more useful error message X-Git-Tag: suricata-5.0.0-rc1~310 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af6daceeda128296cfc075b39b411c696a1cbce7;p=thirdparty%2Fsuricata.git 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. --- 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));