6lowpan: get extra headroom in allocated frame
authoralex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com>
Tue, 10 Jul 2012 21:22:45 +0000 (21:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2012 14:54:45 +0000 (07:54 -0700)
Use netdev_alloc_skb_ip_align() instead of alloc_skb() to get some
extra headroom in case we need to forward this frame in a tunnel or
something else.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/6lowpan.c

index b872515f213785a043f9eae48218813ba5137675..ae3f4eb020649be2dbafd1cd9f30ca360259fe2a 100644 (file)
@@ -661,8 +661,8 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag)
        frame->tag = tag;
 
        /* allocate buffer for frame assembling */
-       frame->skb = alloc_skb(frame->length +
-                              sizeof(struct ipv6hdr), GFP_ATOMIC);
+       frame->skb = netdev_alloc_skb_ip_align(skb->dev, frame->length +
+                                              sizeof(struct ipv6hdr));
 
        if (!frame->skb)
                goto skb_err;