Necessary to understand what is going on when bpf_program_load fails

Signed-off-by: Luca Boccassi <bl...@debian.org>
---
 ip/ipvrf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip/ipvrf.c b/ip/ipvrf.c
index 42779e5c..91578031 100644
--- a/ip/ipvrf.c
+++ b/ip/ipvrf.c
@@ -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,
-- 
2.29.2

Reply via email to