patch-2.3.1 linux/include/net/tcp.h

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

diff -u --recursive --new-file v2.3.0/linux/include/net/tcp.h linux/include/net/tcp.h
@@ -728,7 +728,7 @@
  */
 extern __inline__ __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
 {
-	__u32 snd_wnd_packets = tp->snd_wnd / tp->mss_cache;
+	__u32 snd_wnd_packets = tp->snd_wnd / max(tp->mss_cache, 1);
 
 	return max(min(snd_wnd_packets, tp->snd_cwnd) >> 1, 2);
 }

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