diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2026-05-05 00:04:51 +0300 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2026-05-08 21:38:10 +0300 |
| commit | decb84b8383ab7acff94db208ef7ed19f9c55e1f (patch) | |
| tree | ee35979c9c9943c53ffcf920e562eaa113b90a75 /include | |
| parent | 7995b216a731db657f356f6ae37a42f445b9a0ec (diff) | |
| download | linux-decb84b8383ab7acff94db208ef7ed19f9c55e1f.tar.xz | |
bpf: tcp: Fix type confusion in bpf_skc_to_tcp_sock().
bpf_skc_to_tcp_sock() only checks if sk->sk_protocol is
IPPROTO_TCP, but RAW socket can bypass it:
socket(AF_INET, SOCK_RAW, IPPROTO_TCP)
Let's use sk_is_tcp().
Fixes: 478cfbdf5f13 ("bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20260504210610.180150-5-kuniyu@google.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
