]> git.karo-electronics.de Git - linux-beck.git/commitdiff
6lowpan: set 6lowpan network and transport header
authorAlexander Aring <alex.aring@gmail.com>
Wed, 30 Oct 2013 08:18:23 +0000 (09:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Oct 2013 21:18:46 +0000 (17:18 -0400)
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: Alexander Aring <alex.aring@gmail.com>
Acked-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/6lowpan.c

index e6db1f51bf5b23b6438af0754ef953cd18722cea..58c07fd967d1816fbd0ecd54331c6aa88282376c 100644 (file)
@@ -654,7 +654,9 @@ static int lowpan_header_create(struct sk_buff *skb,
        head[1] = iphc1;
 
        skb_pull(skb, sizeof(struct ipv6hdr));
+       skb_reset_transport_header(skb);
        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,
                                skb->len);