This is necessary for upcomming patches to calculate the 6lowpan header.
It's a little bit tricky here because a UDP transport header can be
compressed in the network header, so the UDP header is merged in the
6lowpan header. In this case the transport header points to the payload
of the UDP header.

For now it's okay to make it in this way, because we use this to calculate
the 6lowpan header size only.

Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
---
 net/ieee802154/6lowpan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 946b6b4..1743478 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -655,7 +655,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);
-- 
1.8.4


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to