blob: 220a4f8e6f82a12afea38e053faadafd2f4d42ef [file] [log] [blame]
From stable-bounces@linux.kernel.org Wed Jul 18 02:30:56 2007
From: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Date: Wed, 18 Jul 2007 02:30:41 -0700 (PDT)
Subject: TCP FRTO retransmit bug fix
To: stable@kernel.org
Cc: bunk@stusta.de
Message-ID: <20070718.023041.52167051.davem@davemloft.net>
From: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
[TCP]: Verify the presence of RETRANS bit when leaving FRTO
For yet unknown reason, something cleared SACKED_RETRANS bit
underneath FRTO.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp_input.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1398,7 +1398,9 @@ static void tcp_enter_frto_loss(struct s
* waiting for the first ACK and did not get it)...
*/
if ((tp->frto_counter == 1) && !(flag&FLAG_DATA_ACKED)) {
- tp->retrans_out += tcp_skb_pcount(skb);
+ /* For some reason this R-bit might get cleared? */
+ if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS)
+ tp->retrans_out += tcp_skb_pcount(skb);
/* ...enter this if branch just for the first segment */
flag |= FLAG_DATA_ACKED;
} else {