提交 6830c25b 编写于 作者: L Lennart Schulte 提交者: David S. Miller

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: NLennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: NArnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a50436f2
...@@ -2511,6 +2511,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets) ...@@ -2511,6 +2511,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets)
int err; int err;
unsigned int mss; unsigned int mss;
if (packets == 0)
return;
WARN_ON(packets > tp->packets_out); WARN_ON(packets > tp->packets_out);
if (tp->lost_skb_hint) { if (tp->lost_skb_hint) {
skb = tp->lost_skb_hint; skb = tp->lost_skb_hint;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册