Skip to content

Commit

Permalink
[TCP]: Correct DSACK check placing
Browse files Browse the repository at this point in the history
Previously one of the in-block skip branches was missing it.

Also, drop it from tail-fully-processed case because the next
iteration will do exactly the same thing, i.e., process the
SACK block that contains the DSACK information.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Jan 28, 2008
1 parent f7ab97f commit 20de20b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1554,20 +1554,15 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
}

/* Rest of the block already fully processed? */
if (!after(end_seq, cache->end_seq)) {
skb = tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
&fack_count, &reord, &flag);
if (!after(end_seq, cache->end_seq))
goto advance_sp;
}

skb = tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
&fack_count, &reord, &flag);

/* ...tail remains todo... */
if (TCP_SKB_CB(tp->highest_sack)->end_seq == cache->end_seq) {
/* ...but better entrypoint exists! Check that DSACKs are
* properly accounted while skipping here
*/
tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
&fack_count, &reord, &flag);

/* ...but better entrypoint exists! */
skb = tcp_write_queue_next(sk, tp->highest_sack);
fack_count = tp->fackets_out;
cache++;
Expand Down

0 comments on commit 20de20b

Please sign in to comment.