From: Wei Yongjun <[EMAIL PROTECTED]>
Date: Fri, 04 Aug 2006 08:46:13 -0400

> This always correct except when do active open in tcp client, which will
> send a SYN, that segment will not be counted, even if it is not
> restrained. Maybe I can do following to fix this:
> 
> int tcp_connect(struct sock *sk)
> ...
> +     tp->snd_nxt = tp->write_seq;
>       TCP_SKB_CB(buff)->seq = tp->write_seq++;
>       TCP_SKB_CB(buff)->end_seq = tp->write_seq;
> -     tp->snd_nxt = tp->write_seq;
> -     tp->pushed_seq = tp->write_seq;
> 
>       tcp_transmit_skb(sk, buff, 1, GFP_KERNEL);
> +     tp->snd_nxt = tp->write_seq;
> +     tp->pushed_seq = tp->write_seq;
>       TCP_INC_STATS(TCP_MIB_ACTIVEOPENS);
> 
> Do you agree with me? If It is correctly, I will send this patch soon.

This looks fine and should work.

Please add some comments in tcp_connect() explaining the ordering of
assignments, so that a future developer does not break things by
accident.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to