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

Next file: linux/Documentation/Configure.help
Previous file: linux/net/ipv4/rarp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.63/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
@@ -532,7 +532,7 @@
 	}
 
 	t1 =(struct tcphdr *)skb_put(buff,sizeof(struct tcphdr));
-	memcpy(t1, th, sizeof(*t1));
+	memset(t1, 0, sizeof(*t1));
 
 	/*
 	 *	Swap the send and the receive. 
@@ -540,19 +540,16 @@
 
 	t1->dest = th->source;
 	t1->source = th->dest;
-	t1->syn = 0;
-	t1->fin = 0;
-	t1->urg = 0;
+	t1->doff = sizeof(*t1)/4;
 	t1->rst = 1;
-	t1->psh = 0;  
   
 	if(th->ack)
 	{
-		t1->ack = 0;
 	  	t1->seq = th->ack_seq;
 	}
 	else
 	{
+		t1->ack = 1;
 	  	if(!th->syn)
 			t1->ack_seq = th->seq;
 		else


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