patch-2.4.23 linux-2.4.23/net/ipv4/tcp_input.c

Next file: linux-2.4.23/net/ipv4/tcp_ipv4.c
Previous file: linux-2.4.23/net/ipv4/route.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/net/ipv4/tcp_input.c linux-2.4.23/net/ipv4/tcp_input.c
@@ -1952,7 +1952,10 @@
 				 struct sk_buff *skb, u32 ack, u32 ack_seq)
 {
 	int flag = 0;
-	u32 nwin = ntohs(skb->h.th->window) << tp->snd_wscale;
+	u32 nwin = ntohs(skb->h.th->window);
+
+	if (likely(!skb->h.th->syn))
+		nwin <<= tp->snd_wscale;
 
 	if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
 		flag |= FLAG_WIN_UPDATE;

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