diff options
| author | Eric Dumazet <[email protected]> | 2025-03-01 20:14:19 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-03 23:44:19 +0000 |
| commit | e34100c2ecbb79a7d69474eb2f58545bb9926a5f (patch) | |
| tree | 69677885f643f4b332a2ac6d2337fa867a4c12e2 /net/ipv4/tcp_input.c | |
| parent | Merge branch 'ipv4-fib-convert-rtm_newroute-and-rtm_delroute-to-per-netns-rtnl' (diff) | |
| download | kernel-e34100c2ecbb79a7d69474eb2f58545bb9926a5f.tar.gz kernel-e34100c2ecbb79a7d69474eb2f58545bb9926a5f.zip | |
tcp: add a drop_reason pointer to tcp_check_req()
We want to add new drop reasons for packets dropped in 3WHS in the
following patches.
tcp_rcv_state_process() has to set reason to TCP_FASTOPEN,
because tcp_check_req() will conditionally overwrite the drop_reason.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Jason Xing <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d22ad553b45b..4e2212348088 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -6812,10 +6812,9 @@ tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb) WARN_ON_ONCE(sk->sk_state != TCP_SYN_RECV && sk->sk_state != TCP_FIN_WAIT1); - if (!tcp_check_req(sk, skb, req, true, &req_stolen)) { - SKB_DR_SET(reason, TCP_FASTOPEN); + SKB_DR_SET(reason, TCP_FASTOPEN); + if (!tcp_check_req(sk, skb, req, true, &req_stolen, &reason)) goto discard; - } } if (!th->ack && !th->rst && !th->syn) { |
