Files
linux/net
xin.guo a041f70e57 tcp: fix tcp_ofo_queue() to avoid including too much DUP SACK range
If the new coming segment covers more than one skbs in the ofo queue,
and which seq is equal to rcv_nxt, then the sequence range
that is duplicated will be sent as DUP SACK, the detail as below,
in step6, the {501,2001} range is clearly including too much
DUP SACK range, in violation of RFC 2883 rules.

1. client > server: Flags [.], seq 501:1001, ack 1325288529, win 20000, length 500
2. server > client: Flags [.], ack 1, [nop,nop,sack 1 {501:1001}], length 0
3. client > server: Flags [.], seq 1501:2001, ack 1325288529, win 20000, length 500
4. server > client: Flags [.], ack 1, [nop,nop,sack 2 {1501:2001} {501:1001}], length 0
5. client > server: Flags [.], seq 1:2001, ack 1325288529, win 20000, length 2000
6. server > client: Flags [.], ack 2001, [nop,nop,sack 1 {501:2001}], length 0

After this fix, the final ACK is as below:

6. server > client: Flags [.], ack 2001, options [nop,nop,sack 1 {501:1001}], length 0

[edumazet] added a new packetdrill test in the following patch.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: xin.guo <guoxin0309@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250626123420.1933835-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-27 15:35:03 -07:00
..
2025-04-22 07:04:02 -07:00
2025-06-23 17:04:03 -07:00
2025-06-23 16:58:43 -07:00
2024-10-15 18:52:26 -07:00
2025-06-27 15:34:18 -07:00
2025-06-23 17:04:03 -07:00
2025-06-23 17:05:12 -07:00
2025-06-23 17:04:03 -07:00
2025-06-23 17:04:03 -07:00
2025-06-21 07:35:39 -07:00
2025-06-23 17:05:12 -07:00
2025-06-23 17:05:12 -07:00
2025-06-23 17:04:03 -07:00
2025-06-23 17:05:12 -07:00
2025-06-23 17:04:03 -07:00
2024-10-08 15:16:59 +02:00
2025-04-11 18:58:10 -07:00
2025-06-23 17:04:03 -07:00