diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-18 07:03:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 07:03:27 -0400 |
commit | 2f275f91a438abd8eec5321798d66a4ffe6869fa (patch) | |
tree | a14cc8f7112d2ba0dfe08e43577cab779b858ba6 /net/ipv4/af_inet.c | |
parent | 61a7e26028b94805fd686a6dc9dbd9941f8f19b0 (diff) |
mib: put udp statistics on struct net
Similar to... ouch, I repeat myself.
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 776ed3199b52..1f418164ebf2 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1349,10 +1349,15 @@ static __net_init int ipv4_mib_init_net(struct net *net) | |||
1349 | if (snmp_mib_init((void **)net->mib.net_statistics, | 1349 | if (snmp_mib_init((void **)net->mib.net_statistics, |
1350 | sizeof(struct linux_mib)) < 0) | 1350 | sizeof(struct linux_mib)) < 0) |
1351 | goto err_net_mib; | 1351 | goto err_net_mib; |
1352 | if (snmp_mib_init((void **)net->mib.udp_statistics, | ||
1353 | sizeof(struct udp_mib)) < 0) | ||
1354 | goto err_udp_mib; | ||
1352 | 1355 | ||
1353 | tcp_mib_init(net); | 1356 | tcp_mib_init(net); |
1354 | return 0; | 1357 | return 0; |
1355 | 1358 | ||
1359 | err_udp_mib: | ||
1360 | snmp_mib_free((void **)net->mib.net_statistics); | ||
1356 | err_net_mib: | 1361 | err_net_mib: |
1357 | snmp_mib_free((void **)net->mib.ip_statistics); | 1362 | snmp_mib_free((void **)net->mib.ip_statistics); |
1358 | err_ip_mib: | 1363 | err_ip_mib: |
@@ -1363,6 +1368,7 @@ err_tcp_mib: | |||
1363 | 1368 | ||
1364 | static __net_exit void ipv4_mib_exit_net(struct net *net) | 1369 | static __net_exit void ipv4_mib_exit_net(struct net *net) |
1365 | { | 1370 | { |
1371 | snmp_mib_free((void **)net->mib.udp_statistics); | ||
1366 | snmp_mib_free((void **)net->mib.net_statistics); | 1372 | snmp_mib_free((void **)net->mib.net_statistics); |
1367 | snmp_mib_free((void **)net->mib.ip_statistics); | 1373 | snmp_mib_free((void **)net->mib.ip_statistics); |
1368 | snmp_mib_free((void **)net->mib.tcp_statistics); | 1374 | snmp_mib_free((void **)net->mib.tcp_statistics); |
@@ -1381,9 +1387,6 @@ static int __init init_ipv4_mibs(void) | |||
1381 | if (snmp_mib_init((void **)icmpmsg_statistics, | 1387 | if (snmp_mib_init((void **)icmpmsg_statistics, |
1382 | sizeof(struct icmpmsg_mib)) < 0) | 1388 | sizeof(struct icmpmsg_mib)) < 0) |
1383 | goto err_icmpmsg_mib; | 1389 | goto err_icmpmsg_mib; |
1384 | if (snmp_mib_init((void **)udp_statistics, | ||
1385 | sizeof(struct udp_mib)) < 0) | ||
1386 | goto err_udp_mib; | ||
1387 | if (snmp_mib_init((void **)udplite_statistics, | 1390 | if (snmp_mib_init((void **)udplite_statistics, |
1388 | sizeof(struct udp_mib)) < 0) | 1391 | sizeof(struct udp_mib)) < 0) |
1389 | goto err_udplite_mib; | 1392 | goto err_udplite_mib; |
@@ -1396,8 +1399,6 @@ static int __init init_ipv4_mibs(void) | |||
1396 | err_net: | 1399 | err_net: |
1397 | snmp_mib_free((void **)udplite_statistics); | 1400 | snmp_mib_free((void **)udplite_statistics); |
1398 | err_udplite_mib: | 1401 | err_udplite_mib: |
1399 | snmp_mib_free((void **)udp_statistics); | ||
1400 | err_udp_mib: | ||
1401 | snmp_mib_free((void **)icmpmsg_statistics); | 1402 | snmp_mib_free((void **)icmpmsg_statistics); |
1402 | err_icmpmsg_mib: | 1403 | err_icmpmsg_mib: |
1403 | snmp_mib_free((void **)icmp_statistics); | 1404 | snmp_mib_free((void **)icmp_statistics); |