tcp: fix DSACK-based undo on non-duplicate ACK
authorPriyaranjan Jha <priyarjha@google.com>
Sat, 4 Nov 2017 00:46:55 +0000 (17:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 14:16:50 +0000 (23:16 +0900)
commitd09b9e60e06d431b008a878c4b1d48d6cce816ef
tree9103eaddfa036339503e084546d0d8d3c9fcad47
parent8f7dc9ae4a7aece9fbc3e6637bdfa38b36bcdf09
tcp: fix DSACK-based undo on non-duplicate ACK

Fixes DSACK-based undo when sender is in Open State and
an ACK advances snd_una.

Example scenario:
- Sender goes into recovery and makes some spurious rtx.
- It comes out of recovery and enters into open state.
- It sends some more packets, let's say 4.
- The receiver sends an ACK for the first two, but this ACK is lost.
- The sender receives ack for first two, and DSACK for previous
  spurious rtx.

Signed-off-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yousuk Seung <ysseung@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c