Merge tag 'v4.9.209' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
[platform/kernel/linux-amlogic.git] / net / ipv4 / tcp_input.c
index c07c311..5e2ef56 100644 (file)
@@ -1742,8 +1742,11 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
                }
 
                /* Ignore very old stuff early */
-               if (!after(sp[used_sacks].end_seq, prior_snd_una))
+               if (!after(sp[used_sacks].end_seq, prior_snd_una)) {
+                       if (i == 0)
+                               first_sack_index = -1;
                        continue;
+               }
 
                used_sacks++;
        }