patch-1.3.54 linux/net/ipv4/ip_output.c

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

diff -u --recursive --new-file v1.3.53/linux/net/ipv4/ip_output.c linux/net/ipv4/ip_output.c
@@ -20,6 +20,7 @@
  *
  *	Fixes:
  *		Alan Cox	:	Missing nonblock feature in ip_build_xmit.
+ *		Mike Kilburn	:	htons() missing in ip_build_xmit.
  */
 
 #include <asm/segment.h>
@@ -153,7 +154,7 @@
 
 	skb->dev = dev;
 	skb->arp = 1;
-	skb->protocol = ETH_P_IP;
+	skb->protocol = htons(ETH_P_IP);
 	if (dev->hard_header)
 	{
 		skb_reserve(skb,MAX_HEADER);
@@ -652,6 +653,7 @@
 			return error;
 		}
 		skb->dev=dev;
+		skb->protocol = htons(ETH_P_IP);
 		skb->free=1;
 		skb->when=jiffies;
 		skb->sk=sk;
@@ -817,8 +819,8 @@
 		 *	Fill in the control structures
 		 */
 		 
-		skb->next = skb->prev = NULL;
 		skb->dev = dev;
+		skb->protocol = htons(ETH_P_IP);
 		skb->when = jiffies;
 		skb->free = 1; /* dubious, this one */
 		skb->sk = sk;

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