aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2024-01-15 20:55:10 +0000
committerAlexei Starovoitov <[email protected]>2024-01-23 22:40:23 +0000
commit95e752b5299fa8c90099f7bc2aa1ee3e2e2c95ab (patch)
tree5ece4dad0462c0a9cca1edd8c594d752cd300e4c /tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
parenttcp: Move tcp_ns_to_ts() to tcp.h (diff)
downloadkernel-95e752b5299fa8c90099f7bc2aa1ee3e2e2c95ab.tar.gz
kernel-95e752b5299fa8c90099f7bc2aa1ee3e2e2c95ab.zip
tcp: Move skb_steal_sock() to request_sock.h
We will support arbitrary SYN Cookie with BPF. If BPF prog validates ACK and kfunc allocates a reqsk, it will be carried to TCP stack as skb->sk with req->syncookie 1. In skb_steal_sock(), we need to check inet_reqsk(sk)->syncookie to see if the reqsk is created by kfunc. However, inet_reqsk() is not available in sock.h. Let's move skb_steal_sock() to request_sock.h. While at it, we refactor skb_steal_sock() so it returns early if skb->sk is NULL to minimise the following patch. Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c')
0 files changed, 0 insertions, 0 deletions