diff options
author | Lennart Schulte <lennart.schulte@nets.rwth-aachen.de> | 2010-03-16 22:16:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-20 01:47:22 -0400 |
commit | 6830c25b7d08fbbd922959425193791bc42079f2 (patch) | |
tree | 4a3175a62c62375a5b7a611914842ccc48328aa1 /net | |
parent | a50436f2cd6e85794f7e1aad795ca8302177b896 (diff) |
tcp: Fix tcp_mark_head_lost() with packets == 0
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>
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 788851ca8c5d..c096a4218b8f 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2511,6 +2511,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets) | |||
2511 | int err; | 2511 | int err; |
2512 | unsigned int mss; | 2512 | unsigned int mss; |
2513 | 2513 | ||
2514 | if (packets == 0) | ||
2515 | return; | ||
2516 | |||
2514 | WARN_ON(packets > tp->packets_out); | 2517 | WARN_ON(packets > tp->packets_out); |
2515 | if (tp->lost_skb_hint) { | 2518 | if (tp->lost_skb_hint) { |
2516 | skb = tp->lost_skb_hint; | 2519 | skb = tp->lost_skb_hint; |