patch-2.4.0-prerelease linux/include/net/tcp.h

Next file: linux/include/net/tcp_ecn.h
Previous file: linux/include/net/sock.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test12/linux/include/net/tcp.h linux/include/net/tcp.h
@@ -923,8 +923,11 @@
 static inline void tcp_initialize_rcv_mss(struct sock *sk)
 {
 	struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
+	int hint = min(tp->advmss, tp->mss_cache);
 
-	tp->ack.rcv_mss = max(min(tp->advmss, TCP_MIN_RCVMSS), TCP_MIN_MSS);
+	hint = min(hint, tp->rcv_wnd/2);
+		
+	tp->ack.rcv_mss = max(min(hint, TCP_MIN_RCVMSS), TCP_MIN_MSS);
 }
 
 static __inline__ void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)