diff options
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r-- | net/ipv6/proc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index efee7a6301a8..4158d386b0aa 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -161,6 +161,7 @@ static int snmp6_seq_show(struct seq_file *seq, void *v) | |||
161 | 161 | ||
162 | if (idev) { | 162 | if (idev) { |
163 | seq_printf(seq, "%-32s\t%u\n", "ifIndex", idev->dev->ifindex); | 163 | seq_printf(seq, "%-32s\t%u\n", "ifIndex", idev->dev->ifindex); |
164 | snmp6_seq_show_item(seq, (void **)idev->stats.ipv6, snmp6_ipstats_list); | ||
164 | snmp6_seq_show_item(seq, (void **)idev->stats.icmpv6, snmp6_icmp6_list); | 165 | snmp6_seq_show_item(seq, (void **)idev->stats.icmpv6, snmp6_icmp6_list); |
165 | } else { | 166 | } else { |
166 | snmp6_seq_show_item(seq, (void **)ipv6_statistics, snmp6_ipstats_list); | 167 | snmp6_seq_show_item(seq, (void **)ipv6_statistics, snmp6_ipstats_list); |
@@ -281,6 +282,9 @@ int snmp6_alloc_dev(struct inet6_dev *idev) | |||
281 | if (!idev || !idev->dev) | 282 | if (!idev || !idev->dev) |
282 | return -EINVAL; | 283 | return -EINVAL; |
283 | 284 | ||
285 | if (snmp6_mib_init((void **)idev->stats.ipv6, sizeof(struct ipstats_mib), | ||
286 | __alignof__(struct ipstats_mib)) < 0) | ||
287 | goto err_ip; | ||
284 | if (snmp6_mib_init((void **)idev->stats.icmpv6, sizeof(struct icmpv6_mib), | 288 | if (snmp6_mib_init((void **)idev->stats.icmpv6, sizeof(struct icmpv6_mib), |
285 | __alignof__(struct icmpv6_mib)) < 0) | 289 | __alignof__(struct icmpv6_mib)) < 0) |
286 | goto err_icmp; | 290 | goto err_icmp; |
@@ -288,12 +292,15 @@ int snmp6_alloc_dev(struct inet6_dev *idev) | |||
288 | return 0; | 292 | return 0; |
289 | 293 | ||
290 | err_icmp: | 294 | err_icmp: |
295 | snmp6_mib_free((void **)idev->stats.ipv6); | ||
296 | err_ip: | ||
291 | return err; | 297 | return err; |
292 | } | 298 | } |
293 | 299 | ||
294 | int snmp6_free_dev(struct inet6_dev *idev) | 300 | int snmp6_free_dev(struct inet6_dev *idev) |
295 | { | 301 | { |
296 | snmp6_mib_free((void **)idev->stats.icmpv6); | 302 | snmp6_mib_free((void **)idev->stats.icmpv6); |
303 | snmp6_mib_free((void **)idev->stats.ipv6); | ||
297 | return 0; | 304 | return 0; |
298 | } | 305 | } |
299 | 306 | ||