mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
[TCP]: Re-place highest_sack check to a more robust position
I previously added checking to position that is rather poor as state has already been adjusted quite a bit. Re-placing it above all state changes should be more robust though the return should never ever get executed regardless of its place :-). Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b0d045ca45
commit
a6963a6b3d
@ -1718,6 +1718,10 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
|
|||||||
BUG_ON(tcp_skb_pcount(skb) != 1 ||
|
BUG_ON(tcp_skb_pcount(skb) != 1 ||
|
||||||
tcp_skb_pcount(next_skb) != 1);
|
tcp_skb_pcount(next_skb) != 1);
|
||||||
|
|
||||||
|
if (WARN_ON(tp->sacked_out &&
|
||||||
|
(TCP_SKB_CB(next_skb)->seq == tp->highest_sack)))
|
||||||
|
return;
|
||||||
|
|
||||||
/* Ok. We will be able to collapse the packet. */
|
/* Ok. We will be able to collapse the packet. */
|
||||||
tcp_unlink_write_queue(next_skb, sk);
|
tcp_unlink_write_queue(next_skb, sk);
|
||||||
|
|
||||||
@ -1734,10 +1738,6 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
|
|||||||
/* Update sequence range on original skb. */
|
/* Update sequence range on original skb. */
|
||||||
TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq;
|
TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq;
|
||||||
|
|
||||||
if (WARN_ON(tp->sacked_out &&
|
|
||||||
(TCP_SKB_CB(next_skb)->seq == tp->highest_sack)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Merge over control information. */
|
/* Merge over control information. */
|
||||||
flags |= TCP_SKB_CB(next_skb)->flags; /* This moves PSH/FIN etc. over */
|
flags |= TCP_SKB_CB(next_skb)->flags; /* This moves PSH/FIN etc. over */
|
||||||
TCP_SKB_CB(skb)->flags = flags;
|
TCP_SKB_CB(skb)->flags = flags;
|
||||||
|
Loading…
Reference in New Issue
Block a user