On receiving side we don't need to set any headers in skb. The deliver
function delivers the skb to ipv6 handler and the ipv6 handler will set
these headers.

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

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index b2f6f86..7e87d22 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -738,7 +738,6 @@ static int lowpan_skb_deliver(struct sk_buff *skb, struct 
ipv6hdr *hdr)
                return -ENOMEM;
 
        skb_push(new, sizeof(struct ipv6hdr));
-       skb_reset_network_header(new);
        skb_copy_to_linear_data(new, hdr, sizeof(struct ipv6hdr));
 
        new->protocol = htons(ETH_P_IPV6);
@@ -1060,7 +1059,6 @@ lowpan_process_data(struct sk_buff *skb)
                skb = new;
 
                skb_push(skb, sizeof(struct udphdr));
-               skb_reset_transport_header(skb);
                skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr));
 
                lowpan_raw_dump_table(__func__, "raw UDP header dump",
@@ -1323,8 +1321,6 @@ static int lowpan_rcv(struct sk_buff *skb, struct 
net_device *dev,
 
                /* Pull off the 1-byte of 6lowpan header. */
                skb_pull(local_skb, 1);
-               skb_reset_network_header(local_skb);
-               skb_set_transport_header(local_skb, sizeof(struct ipv6hdr));
 
                lowpan_give_skb_to_devices(local_skb);
 
-- 
1.8.4.1


------------------------------------------------------------------------------
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=60135991&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