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:
Felix Fietkau
2026-07-20 10:43:36 +02:00
parent 05208d9a7e
commit acc687da84
+1 -3
View File
@@ -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 *