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>
This commit is contained in:
committed by
David S. Miller
parent
61a7e26028
commit
2f275f91a4
@ -1349,10 +1349,15 @@ static __net_init int ipv4_mib_init_net(struct net *net)
|
||||
if (snmp_mib_init((void **)net->mib.net_statistics,
|
||||
sizeof(struct linux_mib)) < 0)
|
||||
goto err_net_mib;
|
||||
if (snmp_mib_init((void **)net->mib.udp_statistics,
|
||||
sizeof(struct udp_mib)) < 0)
|
||||
goto err_udp_mib;
|
||||
|
||||
tcp_mib_init(net);
|
||||
return 0;
|
||||
|
||||
err_udp_mib:
|
||||
snmp_mib_free((void **)net->mib.net_statistics);
|
||||
err_net_mib:
|
||||
snmp_mib_free((void **)net->mib.ip_statistics);
|
||||
err_ip_mib:
|
||||
@ -1363,6 +1368,7 @@ err_tcp_mib:
|
||||
|
||||
static __net_exit void ipv4_mib_exit_net(struct net *net)
|
||||
{
|
||||
snmp_mib_free((void **)net->mib.udp_statistics);
|
||||
snmp_mib_free((void **)net->mib.net_statistics);
|
||||
snmp_mib_free((void **)net->mib.ip_statistics);
|
||||
snmp_mib_free((void **)net->mib.tcp_statistics);
|
||||
@ -1381,9 +1387,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 **)udp_statistics,
|
||||
sizeof(struct udp_mib)) < 0)
|
||||
goto err_udp_mib;
|
||||
if (snmp_mib_init((void **)udplite_statistics,
|
||||
sizeof(struct udp_mib)) < 0)
|
||||
goto err_udplite_mib;
|
||||
@ -1396,8 +1399,6 @@ static int __init init_ipv4_mibs(void)
|
||||
err_net:
|
||||
snmp_mib_free((void **)udplite_statistics);
|
||||
err_udplite_mib:
|
||||
snmp_mib_free((void **)udp_statistics);
|
||||
err_udp_mib:
|
||||
snmp_mib_free((void **)icmpmsg_statistics);
|
||||
err_icmpmsg_mib:
|
||||
snmp_mib_free((void **)icmp_statistics);
|
||||
|
Reference in New Issue
Block a user