patch-1.3.7 linux/drivers/net/sk_g16.c

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

diff -u --recursive --new-file v1.3.6/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
@@ -1570,7 +1570,7 @@
 	    int len = (rmdp->mlen & 0x0fff);  /* extract message length from receive buffer */
 	    struct sk_buff *skb;
 
-	    skb = dev_alloc_skb(len); /* allocate socket buffer */ 
+	    skb = dev_alloc_skb(len+2); /* allocate socket buffer */ 
 
 	    if (skb == NULL)                /* Could not get mem ? */
 	    {
@@ -1591,6 +1591,7 @@
 	    /* Prepare sk_buff to queue for upper layers */
 
 	    skb->dev = dev;
+	    skb_reserve(skb,2);		/* Align IP header on 16 byte boundary */
 	    
 	    /* 
              * Copy data out of our receive descriptor into sk_buff.

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