aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-07-18 04:03:45 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-18 04:03:45 -0700
commit386019d3514b3ed9de8d0b05b67e638a7048375b (patch)
tree6447cb5bfe73788abab98f4835b95af258bfeeff /net/ipv4/af_inet.c
parent2f275f91a438abd8eec5321798d66a4ffe6869fa (diff)
mib: put udplite 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 1f418164ebf..bf1f200c657 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1352,10 +1352,15 @@ static __net_init int ipv4_mib_init_net(struct net *net)
if (snmp_mib_init((void **)net->mib.udp_statistics,
sizeof(struct udp_mib)) < 0)
goto err_udp_mib;
+ if (snmp_mib_init((void **)net->mib.udplite_statistics,
+ sizeof(struct udp_mib)) < 0)
+ goto err_udplite_mib;
tcp_mib_init(net);
return 0;
+err_udplite_mib:
+ snmp_mib_free((void **)net->mib.udp_statistics);
err_udp_mib:
snmp_mib_free((void **)net->mib.net_statistics);
err_net_mib:
@@ -1368,6 +1373,7 @@ err_tcp_mib:
static __net_exit void ipv4_mib_exit_net(struct net *net)
{
+ snmp_mib_free((void **)net->mib.udplite_statistics);
snmp_mib_free((void **)net->mib.udp_statistics);
snmp_mib_free((void **)net->mib.net_statistics);
snmp_mib_free((void **)net->mib.ip_statistics);
@@ -1387,9 +1393,6 @@ static int __init init_ipv4_mibs(void)
if (snmp_mib_init((void **)icmpmsg_statistics,
sizeof(struct icmpmsg_mib)) < 0)
goto err_icmpmsg_mib;
- if (snmp_mib_init((void **)udplite_statistics,
- sizeof(struct udp_mib)) < 0)
- goto err_udplite_mib;
if (register_pernet_subsys(&ipv4_mib_ops))
goto err_net;
@@ -1397,8 +1400,6 @@ static int __init init_ipv4_mibs(void)
return 0;
err_net:
- snmp_mib_free((void **)udplite_statistics);
-err_udplite_mib:
snmp_mib_free((void **)icmpmsg_statistics);
err_icmpmsg_mib:
snmp_mib_free((void **)icmp_statistics);