Commit 1e3bb18
tcp: re-enable acceptance of FIN packets when RWIN is 0
Commit 2bd99ae ("tcp: accept bare FIN packets under memory
pressure") allowed accepting FIN packets in tcp_data_queue() even when
the receive window was closed, to prevent ACK/FIN loops with broken
clients.
Such a FIN packet is in sequence, but because the FIN consumes a
sequence number, it extends beyond the window. Before commit
9ca48d6 ("tcp: do not accept packets beyond window"),
tcp_sequence() only required the seq to be within the window. After
that change, the entire packet (including the FIN) must fit within the
window. As a result, such FIN packets are now dropped and the handling
path is no longer reached.
Be more lenient by not counting the sequence number consumed by the
FIN when calling tcp_sequence(), restoring the previous behavior for
cases where only the FIN extends beyond the window.
Fixes: 9ca48d6 ("tcp: do not accept packets beyond window")
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260224-fix_zero_wnd_fin-v2-1-a16677ea7cea@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5cc6195 commit 1e3bb18
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4858 | 4858 | | |
4859 | 4859 | | |
4860 | 4860 | | |
4861 | | - | |
| 4861 | + | |
| 4862 | + | |
4862 | 4863 | | |
4863 | 4864 | | |
| 4865 | + | |
4864 | 4866 | | |
4865 | 4867 | | |
4866 | 4868 | | |
4867 | 4869 | | |
4868 | | - | |
4869 | | - | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
| 4873 | + | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
4870 | 4879 | | |
4871 | 4880 | | |
4872 | 4881 | | |
| |||
6379 | 6388 | | |
6380 | 6389 | | |
6381 | 6390 | | |
6382 | | - | |
| 6391 | + | |
| 6392 | + | |
6383 | 6393 | | |
6384 | 6394 | | |
6385 | 6395 | | |
| |||
0 commit comments