[NET]: Use BUILD_BUG_ON() for checking size of skb->cb.
[deliverable/linux.git] / net / ipv6 / af_inet6.c
index 2ff600cfe3a47cfd88cd89a51303e48c8eba6993..bf6e8aff19d4f2fa62a5e18641548bd0a4e2a60b 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>
@@ -659,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;
@@ -758,6 +761,8 @@ static int __init inet6_init(void)
         struct list_head *r;
        int err;
 
+       BUILD_BUG_ON(sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb));
+
 #ifdef MODULE
 #if 0 /* FIXME --RR */
        if (!mod_member_present(&__this_module, can_unload))
@@ -767,11 +772,6 @@ static int __init inet6_init(void)
 #endif
 #endif
 
-       if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)) {
-               printk(KERN_CRIT "inet6_proto_init: size fault\n");
-               return -EINVAL;
-       }
-
        err = proto_register(&tcpv6_prot, 1);
        if (err)
                goto out;
@@ -857,6 +857,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 +922,9 @@ static void __exit inet6_exit(void)
        udp6_proc_exit();
        tcp6_proc_exit();
        raw6_proc_exit();
+#endif
+#ifdef CONFIG_IPV6_MIP6
+       mip6_fini();
 #endif
        /* Cleanup code parts. */
        sit_cleanup();
This page took 0.037525 seconds and 5 git commands to generate.