mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[NETNS][IPV6] proc - protect snmp6 from non-init_net calls
This patchset avoids creation of the /proc entry for snmp6 when the call is made from a network namespace different from the init_net. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
075de93957
commit
300bf591de
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue