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

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

[TCP]: Fix double adjustment of tp->{lost,left}_out in tcp_fragment().



There is an extra left_out/lost_out adjustment in tcp_fragment which
means that the lost_out accounting is always wrong.  This patch removes
that chunk of code.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a044515
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -485,11 +485,6 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
	TCP_SKB_CB(buff)->when = TCP_SKB_CB(skb)->when;
	TCP_SKB_CB(buff)->when = TCP_SKB_CB(skb)->when;
	buff->tstamp = skb->tstamp;
	buff->tstamp = skb->tstamp;


	if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) {
		tp->lost_out -= tcp_skb_pcount(skb);
		tp->left_out -= tcp_skb_pcount(skb);
	}

	old_factor = tcp_skb_pcount(skb);
	old_factor = tcp_skb_pcount(skb);


	/* Fix up tso_factor for both original and new SKB.  */
	/* Fix up tso_factor for both original and new SKB.  */