Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: fix error propagation for bpf syscalls
Currently, interaction with BPF maps via syscalls (open, lookup) might result in log messages of the following form, where the error detail is `success`: ``` [info][filter] [cilium/conntrack.cc:229] cilium.bpf_metadata: IPv4 conntrack map global lookup failed: Success ``` This is due to the fact that BPF maps are accessed in the starter process. Hence, the syscalls are also executed in this separate process and the variable `errno` is never set in the Envoy process where the log is written.. Therefore, this commit fixes the error propagation by setting the variable `errno` after retrieving the response from the privileged client doing the call to the starter process. Fixes: cilium#315 Fixes: cilium#470 Signed-off-by: Marco Hofstetter <[email protected]>
- Loading branch information