aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorYiFei Zhu <[email protected]>2022-09-09 00:49:39 +0000
committerMartin KaFai Lau <[email protected]>2022-09-09 17:40:45 +0000
commit0ffe2412531e95a309d7f0bfe985fc4ca4d39de8 (patch)
tree2c391b0f14d8bdbc1af1726182486400a8151e5a /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentlibbpf: Remove gcc support for bpf_tail_call_static for now (diff)
downloadkernel-0ffe2412531e95a309d7f0bfe985fc4ca4d39de8.tar.gz
kernel-0ffe2412531e95a309d7f0bfe985fc4ca4d39de8.zip
bpf: Invoke cgroup/connect{4,6} programs for unprivileged ICMP ping
Usually when a TCP/UDP connection is initiated, we can bind the socket to a specific IP attached to an interface in a cgroup/connect hook. But for pings, this is impossible, as the hook is not being called. This adds the hook invocation to unprivileged ICMP ping (i.e. ping sockets created with SOCK_DGRAM IPPROTO_ICMP(V6) as opposed to SOCK_RAW. Logic is mirrored from UDP sockets where the hook is invoked during pre_connect, after a check for suficiently sized addr_len. Signed-off-by: YiFei Zhu <[email protected]> Link: https://lore.kernel.org/r/5764914c252fad4cd134fb6664c6ede95f409412.1662682323.git.zhuyifei@google.com Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions