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

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Herbert Xu 2005-09-08 15:10:52 -07:00 committed by David S. Miller
parent a57ebc90f1
commit cf0b450cd5
1 changed files with 1 additions and 1 deletions

View File

@ -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);