IPv6: fix IPV6_RECVERR handling of locally-generated errors
[safe/jmp/linux-2.6] / net / ipv6 / ndisc.c
index c458527..da0a4d2 100644 (file)
@@ -59,6 +59,7 @@
 #include <linux/route.h>
 #include <linux/init.h>
 #include <linux/rcupdate.h>
+#include <linux/slab.h>
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
 #endif
@@ -1772,7 +1773,7 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu
 
 #endif
 
-static int ndisc_net_init(struct net *net)
+static int __net_init ndisc_net_init(struct net *net)
 {
        struct ipv6_pinfo *np;
        struct sock *sk;
@@ -1797,7 +1798,7 @@ static int ndisc_net_init(struct net *net)
        return 0;
 }
 
-static void ndisc_net_exit(struct net *net)
+static void __net_exit ndisc_net_exit(struct net *net)
 {
        inet_ctl_sock_destroy(net->ipv6.ndisc_sk);
 }
@@ -1820,8 +1821,7 @@ int __init ndisc_init(void)
        neigh_table_init(&nd_tbl);
 
 #ifdef CONFIG_SYSCTL
-       err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6,
-                                   NET_IPV6_NEIGH, "ipv6",
+       err = neigh_sysctl_register(NULL, &nd_tbl.parms, "ipv6",
                                    &ndisc_ifinfo_sysctl_change);
        if (err)
                goto out_unregister_pernet;