[IPV6] MIP6: Add routing header type 2 transformation.
[safe/jmp/linux-2.6] / net / ipv6 / af_inet6.c
index 5a0ba58..fc9c8a9 100644 (file)
@@ -59,6 +59,9 @@
 #ifdef CONFIG_IPV6_TUNNEL
 #include <net/ip6_tunnel.h>
 #endif
+#ifdef CONFIG_IPV6_MIP6
+#include <net/mip6.h>
+#endif
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -67,7 +70,7 @@ MODULE_AUTHOR("Cast of dozens");
 MODULE_DESCRIPTION("IPv6 protocol stack for Linux");
 MODULE_LICENSE("GPL");
 
-int sysctl_ipv6_bindv6only;
+int sysctl_ipv6_bindv6only __read_mostly;
 
 /* The inetsw table contains everything that inet_create needs to
  * build a new socket.
@@ -637,6 +640,7 @@ int inet6_sk_rebuild_header(struct sock *sk)
                fl.oif = sk->sk_bound_dev_if;
                fl.fl_ip_dport = inet->dport;
                fl.fl_ip_sport = inet->sport;
+               security_sk_classify_flow(sk, &fl);
 
                if (np->opt && np->opt->srcrt) {
                        struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
@@ -658,7 +662,7 @@ int inet6_sk_rebuild_header(struct sock *sk)
                        return err;
                }
 
-               ip6_dst_store(sk, dst, NULL);
+               __ip6_dst_store(sk, dst, NULL, NULL);
        }
 
        return 0;
@@ -856,6 +860,9 @@ static int __init inet6_init(void)
        ipv6_frag_init();
        ipv6_nodata_init();
        ipv6_destopt_init();
+#ifdef CONFIG_IPV6_MIP6
+       mip6_init();
+#endif
 
        /* Init v6 transport protocols. */
        udpv6_init();
@@ -919,6 +926,9 @@ static void __exit inet6_exit(void)
        tcp6_proc_exit();
        raw6_proc_exit();
 #endif
+#ifdef CONFIG_IPV6_MIP6
+       mip6_fini();
+#endif
        /* Cleanup code parts. */
        sit_cleanup();
        ip6_flowlabel_cleanup();