patch-2.0.35 linux/net/ipv4/tcp_output.c

Next file: linux/net/netrom/Makefile
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.34/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
@@ -34,6 +34,8 @@
  *				  refer to the old obsolete destination.
  *              Elliot Poger    : Added support for SO_BINDTODEVICE.
  *	Juan Jose Ciarlante	: Added sock dynamic source address rewriting
+ *		Alan Cox	: Clear reserved fields - bug reported by
+ *				  J Hadi Salim
  */
 
 #include <linux/config.h>
@@ -837,6 +839,8 @@
 	t1->psh = 0;
 	t1->fin = 0;		/* In case someone sent us a SYN|FIN frame! */
 	t1->doff = sizeof(*t1)/4;
+	t1->res1 = 0;	/* RFC requires this, we upset ECN without it */
+	t1->res2 = 0;
 
 	tcp_send_check(t1, saddr, daddr, sizeof(*t1), buff);
 	prot->queue_xmit(NULL, ndev, buff, 1);
@@ -1017,6 +1021,8 @@
 	t1->psh = 0;
 	t1->ack_seq = htonl(newsk->acked_seq);
 	t1->doff = sizeof(*t1)/4+1;
+	t1->res1 = 0;
+	t1->res2 = 0;
 	ptr = skb_put(buff,4);
 	ptr[0] = 2;
 	ptr[1] = 4;

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