tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp_input.c
index 8116d06e042cac23a8db557332e6e5456ae2736e..53c8ce4046b207cf6dc65735a8a030932095734d 100644 (file)
@@ -1403,6 +1403,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
 
        BUG_ON(!pcount);
 
+       /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
+       if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
+               tp->lost_cnt_hint += pcount;
+
        TCP_SKB_CB(prev)->end_seq += shifted;
        TCP_SKB_CB(skb)->seq += shifted;