]> err.no Git - linux-2.6/commitdiff
[TCP]: Make invariant check complain about invalid sacked_out
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Mon, 31 Dec 2007 12:43:32 +0000 (04:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:20 +0000 (15:00 -0800)
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>
net/ipv4/tcp_input.c

index 722c9cbb91e3e913c95cbf6a1e2b9a7677ab5b4f..41f4b862319d47958d57279abeb9682e58f1b712 100644 (file)
@@ -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;