patch-2.0.31 linux/net/ipv4/tcp_timer.c

Next file: linux/net/ipv4/timer.c
Previous file: linux/net/ipv4/tcp_output.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.30/linux/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
@@ -138,7 +138,9 @@
 		return;
 	}
 
-	sk->ssthresh = sk->cong_window >> 1; /* remember window where we lost */
+	/* remember window where we lost */
+	sk->ssthresh = min(sk->cong_window,
+			(sk->window_seq-sk->rcv_ack_seq)/max(sk->mss,1)) >> 1;
 	/* sk->ssthresh in theory can be zero.  I guess that's OK */
 	sk->cong_count = 0;
 	sk->cong_window = 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov