提交 79ff1db6 编写于 作者: A alex.bluesman.smirnov@gmail.com 提交者: David S. Miller

6lowpan: get extra headroom in allocated frame

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: NAlexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e885a47a
...@@ -661,8 +661,8 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag) ...@@ -661,8 +661,8 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u8 iphc0, u8 len, u8 tag)
frame->tag = tag; frame->tag = tag;
/* allocate buffer for frame assembling */ /* allocate buffer for frame assembling */
frame->skb = alloc_skb(frame->length + frame->skb = netdev_alloc_skb_ip_align(skb->dev, frame->length +
sizeof(struct ipv6hdr), GFP_ATOMIC); sizeof(struct ipv6hdr));
if (!frame->skb) if (!frame->skb)
goto skb_err; goto skb_err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册