patch-1.3.6 linux/drivers/net/tunnel.c

Next file: linux/drivers/net/wavelan.c
Previous file: linux/drivers/net/tulip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.5/linux/drivers/net/tunnel.c linux/drivers/net/tunnel.c
@@ -204,7 +204,7 @@
 	 */
 
 	newlen = (skb->len + ip_header_len);
-	if ( !(skb2 = alloc_skb(newlen, GFP_ATOMIC)) ) 
+	if ( !(skb2 = dev_alloc_skb(newlen)) ) 
 	{
 		printk("%s: No free memory.\n",dev->name);
   		dev_kfree_skb(skb, FREE_WRITE);
@@ -215,7 +215,7 @@
 
 	/* Copy the packet to a new buffer, adding a new ip header */
 	skb2->free=1;
-	skb2->len=newlen;
+	skb_put(skb2,newlen);
 	iph=skb2->h.iph=(struct iphdr *)skb2->data;
 	memcpy(skb2->h.iph, skb->data, ip_header_len );
 	memcpy(skb2->data + ip_header_len, skb->data, skb->len);

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