Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf0b450c authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[TCP]: Fix off by one in tcp_fragment() "already sent" test.

parent a57ebc90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
	/* If this packet has been sent out already, we must
	 * adjust the various packet counters.
	 */
	if (after(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) {
	if (!before(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) {
		int diff = old_factor - tcp_skb_pcount(skb) -
			tcp_skb_pcount(buff);