[SK_BUFF] ipv6: More skb_reset_network_header conversions related to skb_pull
[deliverable/linux.git] / net / ipv6 / datagram.c
index 5f54dec3e2051c5fb8ecd8553d9e8d606784c637..31a20f17c854c46f67c3e585e63115ec52816545 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <linux/socket.h>
 #include <linux/sockios.h>
@@ -252,8 +251,9 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info)
        if (!skb)
                return;
 
-       iph = (struct ipv6hdr*)skb_put(skb, sizeof(struct ipv6hdr));
-       skb->nh.ipv6h = iph;
+       skb_put(skb, sizeof(struct ipv6hdr));
+       skb_reset_network_header(skb);
+       iph = skb->nh.ipv6h;
        ipv6_addr_copy(&iph->daddr, &fl->fl6_dst);
 
        serr = SKB_EXT_ERR(skb);
This page took 0.041235 seconds and 5 git commands to generate.