bpf: ignore errors on program attach
authorFelix Fietkau <nbd@nbd.name>
Thu, 30 Jun 2022 15:40:33 +0000 (17:40 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 30 Jun 2022 15:40:47 +0000 (17:40 +0200)
Fixes issues with old kernels, which return errors for no reason

Signed-off-by: Felix Fietkau <nbd@nbd.name>
bpf.c

diff --git a/bpf.c b/bpf.c
index d0ad6834b5895b1c4514e060bfd16e5d45bc759f..955c1ca847d6541ef742e9a38fa65c0a570079ad 100644 (file)
--- a/bpf.c
+++ b/bpf.c
@@ -97,9 +97,8 @@ int unetd_attach_mssfix(int ifindex, int mtu)
        }
 
        prog_fd = bpf_program__fd(prog);
-       if (unetd_attach_bpf_prog(ifindex, prog_fd, true) ||
-           unetd_attach_bpf_prog(ifindex, prog_fd, false))
-               goto out;
+       unetd_attach_bpf_prog(ifindex, prog_fd, true);
+       unetd_attach_bpf_prog(ifindex, prog_fd, false);
 
        ret = 0;