提交 578d5241 编写于 作者: A Alexander Aring 提交者: David S. Miller

6lowpan: set 6lowpan network and transport header

This is necessary to access network header with the skb_network_header
function instead of calculate the position with mac_len, etc.
Do the same for the transport header, when we replace the IPv6 header
with the 6LoWPAN header.
Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
Acked-by: NWerner Almesberger <werner@almesberger.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3e69162e
...@@ -654,7 +654,9 @@ static int lowpan_header_create(struct sk_buff *skb, ...@@ -654,7 +654,9 @@ static int lowpan_header_create(struct sk_buff *skb,
head[1] = iphc1; head[1] = iphc1;
skb_pull(skb, sizeof(struct ipv6hdr)); skb_pull(skb, sizeof(struct ipv6hdr));
skb_reset_transport_header(skb);
memcpy(skb_push(skb, hc06_ptr - head), head, hc06_ptr - head); memcpy(skb_push(skb, hc06_ptr - head), head, hc06_ptr - head);
skb_reset_network_header(skb);
lowpan_raw_dump_table(__func__, "raw skb data dump", skb->data, lowpan_raw_dump_table(__func__, "raw skb data dump", skb->data,
skb->len); skb->len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册