aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 5ba7ae849d0..2453f2229ef 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -220,6 +220,9 @@ int snmp6_register_dev(struct inet6_dev *idev)
if (!idev || !idev->dev)
return -EINVAL;
+ if (idev->dev->nd_net != &init_net)
+ return 0;
+
if (!proc_net_devsnmp6)
return -ENOENT;