aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/af_inet6.c9
-rw-r--r--net/ipv6/proc.c3
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e8f82eca1609..e09139122efe 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -806,16 +806,12 @@ 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 **)udp_stats_in6, sizeof (struct udp_mib)) < 0)
810 goto err_udp_mib;
811 if (snmp_mib_init((void **)udplite_stats_in6, 809 if (snmp_mib_init((void **)udplite_stats_in6,
812 sizeof (struct udp_mib)) < 0) 810 sizeof (struct udp_mib)) < 0)
813 goto err_udplite_mib; 811 goto err_udplite_mib;
814 return 0; 812 return 0;
815 813
816err_udplite_mib: 814err_udplite_mib:
817 snmp_mib_free((void **)udp_stats_in6);
818err_udp_mib:
819 snmp_mib_free((void **)icmpv6msg_statistics); 815 snmp_mib_free((void **)icmpv6msg_statistics);
820err_icmpmsg_mib: 816err_icmpmsg_mib:
821 snmp_mib_free((void **)icmpv6_statistics); 817 snmp_mib_free((void **)icmpv6_statistics);
@@ -831,17 +827,20 @@ static void cleanup_ipv6_mibs(void)
831 snmp_mib_free((void **)ipv6_statistics); 827 snmp_mib_free((void **)ipv6_statistics);
832 snmp_mib_free((void **)icmpv6_statistics); 828 snmp_mib_free((void **)icmpv6_statistics);
833 snmp_mib_free((void **)icmpv6msg_statistics); 829 snmp_mib_free((void **)icmpv6msg_statistics);
834 snmp_mib_free((void **)udp_stats_in6);
835 snmp_mib_free((void **)udplite_stats_in6); 830 snmp_mib_free((void **)udplite_stats_in6);
836} 831}
837 832
838static int __net_init ipv6_init_mibs(struct net *net) 833static int __net_init ipv6_init_mibs(struct net *net)
839{ 834{
835 if (snmp_mib_init((void **)net->mib.udp_stats_in6,
836 sizeof (struct udp_mib)) < 0)
837 return -ENOMEM;
840 return 0; 838 return 0;
841} 839}
842 840
843static void __net_exit ipv6_cleanup_mibs(struct net *net) 841static void __net_exit ipv6_cleanup_mibs(struct net *net)
844{ 842{
843 snmp_mib_free((void **)net->mib.udp_stats_in6);
845} 844}
846 845
847static int inet6_net_init(struct net *net) 846static int inet6_net_init(struct net *net)
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 23e567fb1d37..3eaf20bf998f 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -180,7 +180,8 @@ static int snmp6_seq_show(struct seq_file *seq, void *v)
180 snmp6_seq_show_item(seq, (void **)ipv6_statistics, snmp6_ipstats_list); 180 snmp6_seq_show_item(seq, (void **)ipv6_statistics, snmp6_ipstats_list);
181 snmp6_seq_show_item(seq, (void **)icmpv6_statistics, snmp6_icmp6_list); 181 snmp6_seq_show_item(seq, (void **)icmpv6_statistics, snmp6_icmp6_list);
182 snmp6_seq_show_icmpv6msg(seq, (void **)icmpv6msg_statistics); 182 snmp6_seq_show_icmpv6msg(seq, (void **)icmpv6msg_statistics);
183 snmp6_seq_show_item(seq, (void **)udp_stats_in6, snmp6_udp6_list); 183 snmp6_seq_show_item(seq, (void **)net->mib.udp_stats_in6,
184 snmp6_udp6_list);
184 snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list); 185 snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list);
185 return 0; 186 return 0;
186} 187}