patch-pre2.0.1 linux/include/net/tcp.h

Next file: linux/ipc/msg.c
Previous file: linux/include/linux/ucdrom.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.100/linux/include/net/tcp.h linux/include/net/tcp.h
@@ -211,13 +211,15 @@
 static __inline__ unsigned short tcp_select_window(struct sock *sk)
 {
 	int window = tcp_new_window(sk);
+	int oldwin = tcp_old_window(sk);
 
 	/* Don't allow a shrinking window */
-	if (window > tcp_old_window(sk)) {
+	if (window > oldwin) {
 		sk->window = window;
 		sk->lastwin_seq = sk->acked_seq;
+		oldwin = window;
 	}
-	return sk->window;
+	return oldwin;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this