mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
ucode-mod-bpf: fix error reporting in tc hook setup
Failures in the detach path returned NULL without recording any error state, so error() reported a stale or empty error. Attach failures reported a hardcoded ENOENT regardless of the actual cause. Record errno for all failures; if_nametoindex, bpf_tc_attach and bpf_tc_detach all set it. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
1 parent
05208d9a7e
commit
acc687da84
1 file changed
+1
-3
@@ -680,9 +680,7 @@ out:
|
||||
return TRUE;
|
||||
|
||||
error:
|
||||
if (fd >= 0)
|
||||
err_return(ENOENT, NULL);
|
||||
return NULL;
|
||||
err_return(errno, NULL);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
|
||||
Reference in new issue
Block a user