]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/ipv4/ipip.c
[SK_BUFF]: Introduce skb_reset_network_header(skb)
[mirror_ubuntu-zesty-kernel.git] / net / ipv4 / ipip.c
index 475bcd1e4181b34939de55853cfeaadb863e1901..5f886c892861e84214b331a6d48a9b86d3a10b2f 100644 (file)
@@ -96,7 +96,6 @@
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/kernel.h>
 #include <asm/uaccess.h>
 #include <linux/skbuff.h>
@@ -406,7 +405,7 @@ out:
        dst_release(skb2->dst);
        skb2->dst = NULL;
        skb_pull(skb2, skb->data - (u8*)eiph);
-       skb2->nh.raw = skb2->data;
+       skb_reset_network_header(skb2);
 
        /* Try to guess incoming interface */
        memset(&fl, 0, sizeof(fl));
@@ -488,7 +487,7 @@ static int ipip_rcv(struct sk_buff *skb)
                secpath_reset(skb);
 
                skb->mac.raw = skb->nh.raw;
-               skb->nh.raw = skb->data;
+               skb_reset_network_header(skb);
                skb->protocol = htons(ETH_P_IP);
                skb->pkt_type = PACKET_HOST;
 
@@ -871,7 +870,7 @@ static int __init ipip_init(void)
 
        printk(banner);
 
-       if (xfrm4_tunnel_register(&ipip_handler)) {
+       if (xfrm4_tunnel_register(&ipip_handler, AF_INET)) {
                printk(KERN_INFO "ipip init: can't register tunnel\n");
                return -EAGAIN;
        }
@@ -893,7 +892,7 @@ static int __init ipip_init(void)
  err2:
        free_netdev(ipip_fb_tunnel_dev);
  err1:
-       xfrm4_tunnel_deregister(&ipip_handler);
+       xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
        goto out;
 }
 
@@ -913,7 +912,7 @@ static void __exit ipip_destroy_tunnels(void)
 
 static void __exit ipip_fini(void)
 {
-       if (xfrm4_tunnel_deregister(&ipip_handler))
+       if (xfrm4_tunnel_deregister(&ipip_handler, AF_INET))
                printk(KERN_INFO "ipip close: can't deregister tunnel\n");
 
        rtnl_lock();