diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-23 04:29:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-23 04:29:23 -0400 |
commit | 77d40a0952b16e020ce07c4cf9fb22024448275b (patch) | |
tree | a93ef6c29c20ae156d5d1a026b00c056f92bc423 | |
parent | 38ce7c736916293b7ce09cd6a2133894fe2cec52 (diff) |
tcp: Fix order of tests in tcp_retransmit_skb()
tcp_write_queue_next() must only be made if we know that
tcp_skb_is_last() evaluates to false.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c3d58ee3e16f..a8499ef3234a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1932,8 +1932,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1932 | /* Collapse two adjacent packets if worthwhile and we can. */ | 1932 | /* Collapse two adjacent packets if worthwhile and we can. */ |
1933 | if (!(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_SYN) && | 1933 | if (!(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_SYN) && |
1934 | (skb->len < (cur_mss >> 1)) && | 1934 | (skb->len < (cur_mss >> 1)) && |
1935 | (tcp_write_queue_next(sk, skb) != tcp_send_head(sk)) && | ||
1936 | (!tcp_skb_is_last(sk, skb)) && | 1935 | (!tcp_skb_is_last(sk, skb)) && |
1936 | (tcp_write_queue_next(sk, skb) != tcp_send_head(sk)) && | ||
1937 | (skb_shinfo(skb)->nr_frags == 0 && | 1937 | (skb_shinfo(skb)->nr_frags == 0 && |
1938 | skb_shinfo(tcp_write_queue_next(sk, skb))->nr_frags == 0) && | 1938 | skb_shinfo(tcp_write_queue_next(sk, skb))->nr_frags == 0) && |
1939 | (tcp_skb_pcount(skb) == 1 && | 1939 | (tcp_skb_pcount(skb) == 1 && |