|
@@ -719,6 +719,21 @@ static void cleanup_ipv6_mibs(void)
|
|
snmp_mib_free((void **)udplite_stats_in6);
|
|
snmp_mib_free((void **)udplite_stats_in6);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int inet6_net_init(struct net *net)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void inet6_net_exit(struct net *net)
|
|
|
|
+{
|
|
|
|
+ return;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static struct pernet_operations inet6_net_ops = {
|
|
|
|
+ .init = inet6_net_init,
|
|
|
|
+ .exit = inet6_net_exit,
|
|
|
|
+};
|
|
|
|
+
|
|
static int __init inet6_init(void)
|
|
static int __init inet6_init(void)
|
|
{
|
|
{
|
|
struct sk_buff *dummy_skb;
|
|
struct sk_buff *dummy_skb;
|
|
@@ -782,6 +797,10 @@ static int __init inet6_init(void)
|
|
* able to communicate via both network protocols.
|
|
* able to communicate via both network protocols.
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+ err = register_pernet_subsys(&inet6_net_ops);
|
|
|
|
+ if (err)
|
|
|
|
+ goto register_pernet_fail;
|
|
|
|
+
|
|
#ifdef CONFIG_SYSCTL
|
|
#ifdef CONFIG_SYSCTL
|
|
err = ipv6_sysctl_register();
|
|
err = ipv6_sysctl_register();
|
|
if (err)
|
|
if (err)
|
|
@@ -901,6 +920,8 @@ icmp_fail:
|
|
ipv6_sysctl_unregister();
|
|
ipv6_sysctl_unregister();
|
|
sysctl_fail:
|
|
sysctl_fail:
|
|
#endif
|
|
#endif
|
|
|
|
+ unregister_pernet_subsys(&inet6_net_ops);
|
|
|
|
+register_pernet_fail:
|
|
cleanup_ipv6_mibs();
|
|
cleanup_ipv6_mibs();
|
|
out_unregister_sock:
|
|
out_unregister_sock:
|
|
sock_unregister(PF_INET6);
|
|
sock_unregister(PF_INET6);
|
|
@@ -956,6 +977,7 @@ static void __exit inet6_exit(void)
|
|
#ifdef CONFIG_SYSCTL
|
|
#ifdef CONFIG_SYSCTL
|
|
ipv6_sysctl_unregister();
|
|
ipv6_sysctl_unregister();
|
|
#endif
|
|
#endif
|
|
|
|
+ unregister_pernet_subsys(&inet6_net_ops);
|
|
cleanup_ipv6_mibs();
|
|
cleanup_ipv6_mibs();
|
|
proto_unregister(&rawv6_prot);
|
|
proto_unregister(&rawv6_prot);
|
|
proto_unregister(&udplitev6_prot);
|
|
proto_unregister(&udplitev6_prot);
|