diff options
author | Lennart Schulte <lennart.schulte@nets.rwth-aachen.de> | 2010-03-16 22:16:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 19:02:11 -0400 |
commit | bc56fb554602a3b87c7e58bb910ddfb1e6b978bb (patch) | |
tree | 84ece5106052446671b4ae4b5d517baf963a2ea9 /net | |
parent | 089a124822a5c5a03480643c8265597d209ddee6 (diff) |
tcp: Fix tcp_mark_head_lost() with packets == 0
[ Upstream commit 6830c25b7d08fbbd922959425193791bc42079f2 ]
A packet is marked as lost in case packets == 0, although nothing should be done.
This results in a too early retransmitted packet during recovery in some cases.
This small patch fixes this issue by returning immediately.
Signed-off-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3fddc69ccccc..b347d3c46b1a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2499,6 +2499,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets) | |||
2499 | int err; | 2499 | int err; |
2500 | unsigned int mss; | 2500 | unsigned int mss; |
2501 | 2501 | ||
2502 | if (packets == 0) | ||
2503 | return; | ||
2504 | |||
2502 | WARN_ON(packets > tp->packets_out); | 2505 | WARN_ON(packets > tp->packets_out); |
2503 | if (tp->lost_skb_hint) { | 2506 | if (tp->lost_skb_hint) { |
2504 | skb = tp->lost_skb_hint; | 2507 | skb = tp->lost_skb_hint; |