Skip to content

Commit

Permalink
[TCP]: Fix off by one in tcp_fragment() "already sent" test.
Browse files Browse the repository at this point in the history
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Sep 8, 2005
1 parent a57ebc9 commit cf0b450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit cf0b450

Please sign in to comment.