Skip to content

Commit

Permalink
6lowpan: get extra headroom in allocated frame
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
alex.bluesman.smirnov@gmail.com authored and David S. Miller committed Jul 12, 2012
1 parent e885a47 commit 79ff1db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ieee802154/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79ff1db

Please sign in to comment.