From: Felix Fietkau Date: Thu, 30 Jun 2022 15:40:33 +0000 (+0200) Subject: bpf: ignore errors on program attach X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=425e75e3c38a7f1b6b732ff6ad0475073a6125b6;p=project%2Funetd.git bpf: ignore errors on program attach Fixes issues with old kernels, which return errors for no reason Signed-off-by: Felix Fietkau --- 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;