Skip to content

Commit

Permalink
[TCP]: Make invariant check complain about invalid sacked_out
Browse files Browse the repository at this point in the history
Earlier resolution for NewReno's sacked_out should now keep
it small enough for this to become invariant-like check.

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 61f1ab4 commit 3ccd313
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2504,11 +2504,8 @@ tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
(tcp_fackets_out(tp) > tp->reordering));
int fast_rexmit = 0;

/* Some technical things:
* 1. Reno does not count dupacks (sacked_out) automatically. */
if (!tp->packets_out)
if (WARN_ON(!tp->packets_out && tp->sacked_out))
tp->sacked_out = 0;

if (WARN_ON(!tp->sacked_out && tp->fackets_out))
tp->fackets_out = 0;

Expand Down

0 comments on commit 3ccd313

Please sign in to comment.