patch-1.3.2 linux/net/ipv4/raw.c

Next file: linux/net/socket.c
Previous file: linux/net/ipv4/ipip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.1/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
@@ -144,6 +144,13 @@
 		struct iphdr *iph=(struct iphdr *)to;
 		iph->saddr=saddr;
 		iph->check=0;
+		iph->tot_len=htons(fraglen);	/* This is right as you cant frag
+					   RAW packets */
+		/*
+	 	 *	Deliberate breach of modularity to keep 
+	 	 *	ip_build_xmit clean (well less messy).
+		 */
+		iph->id = htons(ip_id_count++);
 		iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl);
 	}
 }

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