[TCP]: Fix double adjustment of tp->{lost,left}_out in tcp_fragment().
[pandora-kernel.git] / net / ipv4 / tcp_output.c
index 6094db5..c10e443 100644 (file)
@@ -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;
        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);
 
        /* Fix up tso_factor for both original and new SKB.  */
@@ -499,7 +494,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);