Skip to content

Commit

Permalink
[TCP]: Use S+L catcher only with SACK for now
Browse files Browse the repository at this point in the history
TCP has a transitional state when SACK is not in use during
which this invariant is temporarily broken. Without SACK,
tcp_clean_rtx_queue does not decrement sacked_out. Therefore
calls to tcp_sync_left_out before sacked_out is again
corrected by tcp_fastretrans_alert can trigger this trap as
sacked_out still has couple of segments that are already out
of window.

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 May 3, 2007
1 parent ec9c948 commit 0ec9682
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,8 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)

static inline void tcp_sync_left_out(struct tcp_sock *tp)
{
BUG_ON(tp->sacked_out + tp->lost_out > tp->packets_out);
BUG_ON(tp->rx_opt.sack_ok &&
(tp->sacked_out + tp->lost_out > tp->packets_out));
tp->left_out = tp->sacked_out + tp->lost_out;
}

Expand Down

0 comments on commit 0ec9682

Please sign in to comment.