From 425e75e3c38a7f1b6b732ff6ad0475073a6125b6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 30 Jun 2022 17:40:33 +0200 Subject: [PATCH] bpf: ignore errors on program attach Fixes issues with old kernels, which return errors for no reason Signed-off-by: Felix Fietkau --- bpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bpf.c b/bpf.c index d0ad683..955c1ca 100644 --- 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; -- 2.30.2