diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 5ba7ae849d042c45ad970c9b0aa1a2acbf4ccc2c..2453f2229ef7b7ab805ccabc5fd892590216bef3 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;