Commit 7e59c60
tcp: fix __tcp_close() to only send RST when required
[ Upstream commit 5f9238530970f2993b23dd67fdaffc552a2d2e98 ]
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>
Signed-off-by: Ulrich Hecht <uli@kernel.org>1 parent 0f9f5ee commit 7e59c60
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
| 2350 | + | |
2350 | 2351 | | |
2351 | | - | |
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
| |||
2367 | 2367 | | |
2368 | 2368 | | |
2369 | 2369 | | |
2370 | | - | |
| 2370 | + | |
2371 | 2371 | | |
2372 | 2372 | | |
2373 | | - | |
2374 | | - | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
2375 | 2376 | | |
2376 | 2377 | | |
2377 | 2378 | | |
| |||
0 commit comments