Commit 5eb76d1
tcp: fix __tcp_close() to only send RST when required
[ Upstream commit 5f92385 ]
If the receive queue contains payload that was already
received, __tcp_close() can send an unexpected RST.
Refine the code to take tp->copied_seq into account,
as we already do in tcp recvmsg().
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250903084720.1168904-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e4ed50b commit 5eb76d1
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3099 | 3099 | | |
3100 | 3100 | | |
3101 | 3101 | | |
| 3102 | + | |
3102 | 3103 | | |
3103 | | - | |
3104 | 3104 | | |
3105 | 3105 | | |
3106 | 3106 | | |
| |||
3119 | 3119 | | |
3120 | 3120 | | |
3121 | 3121 | | |
3122 | | - | |
| 3122 | + | |
3123 | 3123 | | |
3124 | 3124 | | |
3125 | | - | |
3126 | | - | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
3127 | 3128 | | |
3128 | 3129 | | |
3129 | 3130 | | |
| |||
0 commit comments