diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 07:03:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 07:03:45 -0400 |
commit | 386019d3514b3ed9de8d0b05b67e638a7048375b (patch) | |
tree | 6447cb5bfe73788abab98f4835b95af258bfeeff /net/ipv4/af_inet.c | |
parent | 2f275f91a438abd8eec5321798d66a4ffe6869fa (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.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 1f418164ebf2..bf1f200c6575 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) | |||
1352 | if (snmp_mib_init((void **)net->mib.udp_statistics, | 1352 | if (snmp_mib_init((void **)net->mib.udp_statistics, |
1353 | sizeof(struct udp_mib)) < 0) | 1353 | sizeof(struct udp_mib)) < 0) |
1354 | goto err_udp_mib; | 1354 | goto err_udp_mib; |
1355 | if (snmp_mib_init((void **)net->mib.udplite_statistics, | ||
1356 | sizeof(struct udp_mib)) < 0) | ||
1357 | goto err_udplite_mib; | ||
1355 | 1358 | ||
1356 | tcp_mib_init(net); | 1359 | tcp_mib_init(net); |
1357 | return 0; | 1360 | return 0; |
1358 | 1361 | ||
1362 | err_udplite_mib: | ||
1363 | snmp_mib_free((void **)net->mib.udp_statistics); | ||
1359 | err_udp_mib: | 1364 | err_udp_mib: |
1360 | snmp_mib_free((void **)net->mib.net_statistics); | 1365 | snmp_mib_free((void **)net->mib.net_statistics); |
1361 | err_net_mib: | 1366 | err_net_mib: |
@@ -1368,6 +1373,7 @@ err_tcp_mib: | |||
1368 | 1373 | ||
1369 | static __net_exit void ipv4_mib_exit_net(struct net *net) | 1374 | static __net_exit void ipv4_mib_exit_net(struct net *net) |
1370 | { | 1375 | { |
1376 | snmp_mib_free((void **)net->mib.udplite_statistics); | ||
1371 | snmp_mib_free((void **)net->mib.udp_statistics); | 1377 | snmp_mib_free((void **)net->mib.udp_statistics); |
1372 | snmp_mib_free((void **)net->mib.net_statistics); | 1378 | snmp_mib_free((void **)net->mib.net_statistics); |
1373 | snmp_mib_free((void **)net->mib.ip_statistics); | 1379 | snmp_mib_free((void **)net->mib.ip_statistics); |
@@ -1387,9 +1393,6 @@ static int __init init_ipv4_mibs(void) | |||
1387 | if (snmp_mib_init((void **)icmpmsg_statistics, | 1393 | if (snmp_mib_init((void **)icmpmsg_statistics, |
1388 | sizeof(struct icmpmsg_mib)) < 0) | 1394 | sizeof(struct icmpmsg_mib)) < 0) |
1389 | goto err_icmpmsg_mib; | 1395 | goto err_icmpmsg_mib; |
1390 | if (snmp_mib_init((void **)udplite_statistics, | ||
1391 | sizeof(struct udp_mib)) < 0) | ||
1392 | goto err_udplite_mib; | ||
1393 | 1396 | ||
1394 | if (register_pernet_subsys(&ipv4_mib_ops)) | 1397 | if (register_pernet_subsys(&ipv4_mib_ops)) |
1395 | goto err_net; | 1398 | goto err_net; |
@@ -1397,8 +1400,6 @@ static int __init init_ipv4_mibs(void) | |||
1397 | return 0; | 1400 | return 0; |
1398 | 1401 | ||
1399 | err_net: | 1402 | err_net: |
1400 | snmp_mib_free((void **)udplite_statistics); | ||
1401 | err_udplite_mib: | ||
1402 | snmp_mib_free((void **)icmpmsg_statistics); | 1403 | snmp_mib_free((void **)icmpmsg_statistics); |
1403 | err_icmpmsg_mib: | 1404 | err_icmpmsg_mib: |
1404 | snmp_mib_free((void **)icmp_statistics); | 1405 | snmp_mib_free((void **)icmp_statistics); |