aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2024-05-07 00:13:32 +0000
committerMartin KaFai Lau <[email protected]>2024-05-07 23:21:59 +0000
commit548c2ede0dc81cb8c86f3a72c1c63fe1c179cbfe (patch)
tree7b7d7cdb28f3dd005ebaeb22fc423a70a25edfb0 /tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c
parentselftests/bpf: add another struct_ops callback use case test (diff)
downloadkernel-548c2ede0dc81cb8c86f3a72c1c63fe1c179cbfe.tar.gz
kernel-548c2ede0dc81cb8c86f3a72c1c63fe1c179cbfe.zip
libbpf: fix libbpf_strerror_r() handling unknown errors
strerror_r(), used from libbpf-specific libbpf_strerror_r() wrapper is documented to return error in two different ways, depending on glibc version. Take that into account when handling strerror_r()'s own errors, which happens when we pass some non-standard (internal) kernel error to it. Before this patch we'd have "ERROR: strerror_r(524)=22", which is quite confusing. Now for the same situation we'll see a bit less visually scary "unknown error (-524)". At least we won't confuse user with irrelevant EINVAL (22). Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c')
0 files changed, 0 insertions, 0 deletions