]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: undo_retrans counter fixes
authorYuchung Cheng <ycheng@google.com>
Mon, 7 Feb 2011 12:57:04 +0000 (12:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Feb 2011 19:31:18 +0000 (11:31 -0800)
commit903cd2cc752e7ef0569a696e8cca7f0c73584491
tree90317e187a511635fdb8682384fc8eb99f1de21f
parentfbeda1f42cfb4fc9d9d49183c24f46cfa1ea158a
tcp: undo_retrans counter fixes

Fix a bug that undo_retrans is incorrectly decremented when undo_marker is
not set or undo_retrans is already 0. This happens when sender receives
more DSACK ACKs than packets retransmitted during the current
undo phase. This may also happen when sender receives DSACK after
the undo operation is completed or cancelled.

Fix another bug that undo_retrans is incorrectly incremented when
sender retransmits an skb and tcp_skb_pcount(skb) > 1 (TSO). This case
is rare but not impossible.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c