diff options
author | Denis V. Lunev <den@openvz.org> | 2008-10-07 17:50:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-07 17:50:06 -0400 |
commit | be713a443ee019489890e93654557916fbf72612 (patch) | |
tree | 0ff5bacfd4b6f17ccc380ef01fcd6661959531b8 /net | |
parent | 0c7ed677fb7013c8028045d409a48ac42151187a (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')
-rw-r--r-- | net/ipv6/af_inet6.c | 14 | ||||
-rw-r--r-- | net/ipv6/proc.c | 3 | ||||
-rw-r--r-- | net/ipv6/udplite.c | 2 |
3 files changed, 10 insertions, 9 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 | ||
814 | err_udplite_mib: | ||
815 | snmp_mib_free((void **)icmpv6msg_statistics); | ||
816 | err_icmpmsg_mib: | 811 | err_icmpmsg_mib: |
817 | snmp_mib_free((void **)icmpv6_statistics); | 812 | snmp_mib_free((void **)icmpv6_statistics); |
818 | err_icmp_mib: | 813 | err_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 | ||
833 | static int __net_init ipv6_init_mibs(struct net *net) | 827 | static 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 | |||
837 | err_udplite_mib: | ||
838 | snmp_mib_free((void **)net->mib.udp_stats_in6); | ||
839 | return -ENOMEM; | ||
839 | } | 840 | } |
840 | 841 | ||
841 | static void __net_exit ipv6_cleanup_mibs(struct net *net) | 842 | static 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 | ||
846 | static int inet6_net_init(struct net *net) | 848 | static int inet6_net_init(struct net *net) |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 3eaf20bf998f..c78cf754ef3f 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -182,7 +182,8 @@ static int snmp6_seq_show(struct seq_file *seq, void *v) | |||
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 **)net->mib.udp_stats_in6, | 183 | snmp6_seq_show_item(seq, (void **)net->mib.udp_stats_in6, |
184 | snmp6_udp6_list); | 184 | snmp6_udp6_list); |
185 | snmp6_seq_show_item(seq, (void **)udplite_stats_in6, snmp6_udplite6_list); | 185 | snmp6_seq_show_item(seq, (void **)net->mib.udplite_stats_in6, |
186 | snmp6_udplite6_list); | ||
186 | return 0; | 187 | return 0; |
187 | } | 188 | } |
188 | 189 | ||
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c index f6cdcb348e05..3cd1a1ac3d6c 100644 --- a/net/ipv6/udplite.c +++ b/net/ipv6/udplite.c | |||
@@ -13,8 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | #include "udp_impl.h" | 14 | #include "udp_impl.h" |
15 | 15 | ||
16 | DEFINE_SNMP_STAT(struct udp_mib, udplite_stats_in6) __read_mostly; | ||
17 | |||
18 | static int udplitev6_rcv(struct sk_buff *skb) | 16 | static int udplitev6_rcv(struct sk_buff *skb) |
19 | { | 17 | { |
20 | return __udp6_lib_rcv(skb, udplite_hash, IPPROTO_UDPLITE); | 18 | return __udp6_lib_rcv(skb, udplite_hash, IPPROTO_UDPLITE); |