]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: skip DSACKs with dubious sequence ranges
authorPriyaranjan Jha <priyarjha@google.com>
Thu, 24 Sep 2020 22:23:14 +0000 (15:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 03:15:45 +0000 (20:15 -0700)
commit41735513398e4effc01f22a39919b98e0489189a
tree13eee63f3542682121acde3c014c7d3423d58456
parent204e75fdc6590909bfe66a0c061a3fe304e4f6a0
tcp: skip DSACKs with dubious sequence ranges

Currently, we use length of DSACKed range to compute number of
delivered packets. And if sequence range in DSACK is corrupted,
we can get bogus dsacked/acked count, and bogus cwnd.

This patch put bounds on DSACKed range to skip update of data
delivery and spurious retransmission information, if the DSACK
is unlikely caused by sender's action:
- DSACKed range shouldn't be greater than maximum advertised rwnd.
- Total no. of DSACKed segments shouldn't be greater than total
  no. of retransmitted segs. Unlike spurious retransmits, network
  duplicates or corrupted DSACKs shouldn't be counted as delivery.

Signed-off-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/snmp.h
net/ipv4/proc.c
net/ipv4/tcp_input.c