diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-23 02:51:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-23 02:51:41 -0700 |
commit | 28e3487b7dd8a9791baac924bc887140ec747bed (patch) | |
tree | b32bacf3b9374cf3e7108f5489aebb79b23aab92 /net/ipv4 | |
parent | 77d40a0952b16e020ce07c4cf9fb22024448275b (diff) |
tcp: Fix queue traversal in tcp_use_frto().
We must check tcp_skb_is_last() before doing a tcp_write_queue_next().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index cbfe13d5f42..3b76bce769d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1746,6 +1746,8 @@ int tcp_use_frto(struct sock *sk) return 0; skb = tcp_write_queue_head(sk); + if (tcp_skb_is_last(sk, skb)) + return 1; skb = tcp_write_queue_next(sk, skb); /* Skips head */ tcp_for_write_queue_from(skb, sk) { if (skb == tcp_send_head(sk)) |