Commit cf0b450cd5176b68ac7d5bbe68aeae6bb6a5a4b8

Authored by Herbert Xu
Committed by David S. Miller
1 parent a57ebc90f1

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/ipv4/tcp_output.c
... ... @@ -499,7 +499,7 @@
499 499 /* If this packet has been sent out already, we must
500 500 * adjust the various packet counters.
501 501 */
502   - if (after(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) {
  502 + if (!before(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) {
503 503 int diff = old_factor - tcp_skb_pcount(skb) -
504 504 tcp_skb_pcount(buff);
505 505