aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-10-07 17:50:06 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-07 17:50:06 -0400
commitbe713a443ee019489890e93654557916fbf72612 (patch)
tree0ff5bacfd4b6f17ccc380ef01fcd6661959531b8 /net/ipv6/af_inet6.c
parent0c7ed677fb7013c8028045d409a48ac42151187a (diff)
netns: make uplitev6 mib per/namespace
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e09139122efe..127b240d2d81 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -806,13 +806,8 @@ static int __init init_ipv6_mibs(void)
806 if (snmp_mib_init((void **)icmpv6msg_statistics, 806 if (snmp_mib_init((void **)icmpv6msg_statistics,
807 sizeof(struct icmpv6msg_mib)) < 0) 807 sizeof(struct icmpv6msg_mib)) < 0)
808 goto err_icmpmsg_mib; 808 goto err_icmpmsg_mib;
809 if (snmp_mib_init((void **)udplite_stats_in6,
810 sizeof (struct udp_mib)) < 0)
811 goto err_udplite_mib;
812 return 0; 809 return 0;
813 810
814err_udplite_mib:
815 snmp_mib_free((void **)icmpv6msg_statistics);
816err_icmpmsg_mib: 811err_icmpmsg_mib:
817 snmp_mib_free((void **)icmpv6_statistics); 812 snmp_mib_free((void **)icmpv6_statistics);
818err_icmp_mib: 813err_icmp_mib:
@@ -827,7 +822,6 @@ static void cleanup_ipv6_mibs(void)
827 snmp_mib_free((void **)ipv6_statistics); 822 snmp_mib_free((void **)ipv6_statistics);
828 snmp_mib_free((void **)icmpv6_statistics); 823 snmp_mib_free((void **)icmpv6_statistics);
829 snmp_mib_free((void **)icmpv6msg_statistics); 824 snmp_mib_free((void **)icmpv6msg_statistics);
830 snmp_mib_free((void **)udplite_stats_in6);
831} 825}
832 826
833static int __net_init ipv6_init_mibs(struct net *net) 827static int __net_init ipv6_init_mibs(struct net *net)
@@ -835,12 +829,20 @@ static int __net_init ipv6_init_mibs(struct net *net)
835 if (snmp_mib_init((void **)net->mib.udp_stats_in6, 829 if (snmp_mib_init((void **)net->mib.udp_stats_in6,
836 sizeof (struct udp_mib)) < 0) 830 sizeof (struct udp_mib)) < 0)
837 return -ENOMEM; 831 return -ENOMEM;
832 if (snmp_mib_init((void **)net->mib.udplite_stats_in6,
833 sizeof (struct udp_mib)) < 0)
834 goto err_udplite_mib;
838 return 0; 835 return 0;
836
837err_udplite_mib:
838 snmp_mib_free((void **)net->mib.udp_stats_in6);
839 return -ENOMEM;
839} 840}
840 841
841static void __net_exit ipv6_cleanup_mibs(struct net *net) 842static void __net_exit ipv6_cleanup_mibs(struct net *net)
842{ 843{
843 snmp_mib_free((void **)net->mib.udp_stats_in6); 844 snmp_mib_free((void **)net->mib.udp_stats_in6);
845 snmp_mib_free((void **)net->mib.udplite_stats_in6);
844} 846}
845 847
846static int inet6_net_init(struct net *net) 848static int inet6_net_init(struct net *net)