On Thu, Sep 08, 2005 at 01:31:26PM -0700, David S. Miller wrote:
> From: Dave Hansen <[EMAIL PROTECTED]>
> Date: Thu, 08 Sep 2005 07:02:17 -0700
> 
> > KERNEL: assertion ((int)tp->lost_out >= 0) failed at net/ipv4/tcp_input.c 
> > (2148)
> 
> So tp->lost_out went negative, didn't we discuss to death last week
> how this was impossible? :-)

We certainly did :) However, the already sent test in tcp_fragment()
is off by one which probably explains these crashes.  This patch should
help.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -499,7 +499,7 @@ int tcp_fragment(struct sock *sk, struct
        /* 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);
 

Reply via email to