vrf: print BPF log buffer if bpf_program_load fails
Necessary to understand what is going on when bpf_program_load fails Signed-off-by: Luca Boccassi <bluca@debian.org> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
1a22ad2721
commit
8dca565b17
|
|
@ -278,8 +278,8 @@ static int vrf_configure_cgroup(const char *path, int ifindex)
|
|||
*/
|
||||
prog_fd = prog_load(ifindex);
|
||||
if (prog_fd < 0) {
|
||||
fprintf(stderr, "Failed to load BPF prog: '%s'\n",
|
||||
strerror(errno));
|
||||
fprintf(stderr, "Failed to load BPF prog: '%s'\n%s",
|
||||
strerror(errno), bpf_log_buf);
|
||||
|
||||
if (errno != EPERM) {
|
||||
fprintf(stderr,
|
||||
|
|
|
|||
Loading…
Reference in New Issue