diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv4/af_inet.c | 11 | ||||
| -rw-r--r-- | net/ipv4/proc.c | 2 | ||||
| -rw-r--r-- | net/ipv4/udplite.c | 1 |
3 files changed, 7 insertions, 7 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); |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 869085c8e43f..765418334b3c 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
| @@ -385,7 +385,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v) | |||
| 385 | seq_puts(seq, "\nUdpLite:"); | 385 | seq_puts(seq, "\nUdpLite:"); |
| 386 | for (i = 0; snmp4_udp_list[i].name != NULL; i++) | 386 | for (i = 0; snmp4_udp_list[i].name != NULL; i++) |
| 387 | seq_printf(seq, " %lu", | 387 | seq_printf(seq, " %lu", |
| 388 | snmp_fold_field((void **)udplite_statistics, | 388 | snmp_fold_field((void **)init_net.mib.udplite_statistics, |
| 389 | snmp4_udp_list[i].entry)); | 389 | snmp4_udp_list[i].entry)); |
| 390 | 390 | ||
| 391 | seq_putc(seq, '\n'); | 391 | seq_putc(seq, '\n'); |
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c index 4ad16b6d5138..3c807964da96 100644 --- a/net/ipv4/udplite.c +++ b/net/ipv4/udplite.c | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
| 12 | */ | 12 | */ |
| 13 | #include "udp_impl.h" | 13 | #include "udp_impl.h" |
| 14 | DEFINE_SNMP_STAT(struct udp_mib, udplite_statistics) __read_mostly; | ||
| 15 | 14 | ||
| 16 | struct hlist_head udplite_hash[UDP_HTABLE_SIZE]; | 15 | struct hlist_head udplite_hash[UDP_HTABLE_SIZE]; |
| 17 | 16 | ||
