diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 04:04:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 04:04:22 -0700 |
commit | 923c6586b0dc0a00df07a1608185437145a0c68b (patch) | |
tree | bbe3324b4ae8920a3a50e81e596c75db11cc9433 /net/ipv4/af_inet.c | |
parent | b60538a0d737609213e4b758881913498d3ff0b4 (diff) |
mib: put icmpmsg statistics on struct net
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 5c72bb3adad..36ff6dc769c 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1358,10 +1358,15 @@ static __net_init int ipv4_mib_init_net(struct net *net) if (snmp_mib_init((void **)net->mib.icmp_statistics, sizeof(struct icmp_mib)) < 0) goto err_icmp_mib; + if (snmp_mib_init((void **)net->mib.icmpmsg_statistics, + sizeof(struct icmpmsg_mib)) < 0) + goto err_icmpmsg_mib; tcp_mib_init(net); return 0; +err_icmpmsg_mib: + snmp_mib_free((void **)net->mib.icmp_statistics); err_icmp_mib: snmp_mib_free((void **)net->mib.udplite_statistics); err_udplite_mib: @@ -1378,6 +1383,7 @@ err_tcp_mib: static __net_exit void ipv4_mib_exit_net(struct net *net) { + snmp_mib_free((void **)net->mib.icmpmsg_statistics); snmp_mib_free((void **)net->mib.icmp_statistics); snmp_mib_free((void **)net->mib.udplite_statistics); snmp_mib_free((void **)net->mib.udp_statistics); @@ -1393,18 +1399,12 @@ static __net_initdata struct pernet_operations ipv4_mib_ops = { static int __init init_ipv4_mibs(void) { - if (snmp_mib_init((void **)icmpmsg_statistics, - sizeof(struct icmpmsg_mib)) < 0) - goto err_icmpmsg_mib; - if (register_pernet_subsys(&ipv4_mib_ops)) goto err_net; return 0; err_net: - snmp_mib_free((void **)icmpmsg_statistics); -err_icmpmsg_mib: return -ENOMEM; } |