From ab5c14d828c4bf6c3cd195d0ef6a44a29d4885fa Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 30 Oct 2004 12:02:50 +0000 Subject: [PATCH] Correct a bug in TCP SACK that could result in wedging of the TCP stack under high load: only set function state to loop and continuing sending if there is no data left to send. RELENG_5_3 candidate. Feet provided: Peter Losher Diagnosed by: Aniel Hartmeier Submitted by: mohan --- sys/netinet/tcp_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 15bf0c0122a..2ad8ccb9438 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -231,12 +231,12 @@ again: tp->snd_recover - p->rxmit)); } else len = ((long)ulmin(cwin, p->end - p->rxmit)); - sack_rxmit = 1; - sendalot = 1; off = p->rxmit - tp->snd_una; KASSERT(off >= 0,("%s: sack block to the left of una : %d", __func__, off)); if (len > 0) { + sack_rxmit = 1; + sendalot = 1; tcpstat.tcps_sack_rexmits++; tcpstat.tcps_sack_rexmit_bytes += min(len, tp->t_maxseg);