aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-10-07 17:48:53 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-07 17:48:53 -0400
commite43291cb37406dae405d50332eaa1ba2264c8dce (patch)
tree90825e5790ff8700839d93f6b92cc2c4918b798a
parentab38dc7a70e59a4888ab4acb51daf3c6012ce4b8 (diff)
netns: add stub functions for per/namespace mibs allocation
The content of init_ipv6_mibs/cleanup_ipv6_mibs will be moved to new calls one by one next. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/af_inet6.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index af90905fd0f3..e8f82eca1609 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -835,6 +835,15 @@ static void cleanup_ipv6_mibs(void)
835 snmp_mib_free((void **)udplite_stats_in6); 835 snmp_mib_free((void **)udplite_stats_in6);
836} 836}
837 837
838static int __net_init ipv6_init_mibs(struct net *net)
839{
840 return 0;
841}
842
843static void __net_exit ipv6_cleanup_mibs(struct net *net)
844{
845}
846
838static int inet6_net_init(struct net *net) 847static int inet6_net_init(struct net *net)
839{ 848{
840 int err = 0; 849 int err = 0;
@@ -842,6 +851,9 @@ static int inet6_net_init(struct net *net)
842 net->ipv6.sysctl.bindv6only = 0; 851 net->ipv6.sysctl.bindv6only = 0;
843 net->ipv6.sysctl.icmpv6_time = 1*HZ; 852 net->ipv6.sysctl.icmpv6_time = 1*HZ;
844 853
854 err = ipv6_init_mibs(net);
855 if (err)
856 return err;
845#ifdef CONFIG_PROC_FS 857#ifdef CONFIG_PROC_FS
846 err = udp6_proc_init(net); 858 err = udp6_proc_init(net);
847 if (err) 859 if (err)
@@ -852,7 +864,6 @@ static int inet6_net_init(struct net *net)
852 err = ac6_proc_init(net); 864 err = ac6_proc_init(net);
853 if (err) 865 if (err)
854 goto proc_ac6_fail; 866 goto proc_ac6_fail;
855out:
856#endif 867#endif
857 return err; 868 return err;
858 869
@@ -861,7 +872,9 @@ proc_ac6_fail:
861 tcp6_proc_exit(net); 872 tcp6_proc_exit(net);
862proc_tcp6_fail: 873proc_tcp6_fail:
863 udp6_proc_exit(net); 874 udp6_proc_exit(net);
864 goto out; 875out:
876 ipv6_cleanup_mibs(net);
877 return err;
865#endif 878#endif
866} 879}
867 880
@@ -872,6 +885,7 @@ static void inet6_net_exit(struct net *net)
872 tcp6_proc_exit(net); 885 tcp6_proc_exit(net);
873 ac6_proc_exit(net); 886 ac6_proc_exit(net);
874#endif 887#endif
888 ipv6_cleanup_mibs(net);
875} 889}
876 890
877static struct pernet_operations inet6_net_ops = { 891static struct pernet_operations inet6_net_ops = {