projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
075de93
)
[NETNS][IPV6] proc - protect snmp6 from non-init_net calls
author
Daniel Lezcano
<dlezcano@fr.ibm.com>
Wed, 5 Mar 2008 18:46:31 +0000
(10:46 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 5 Mar 2008 18:46:31 +0000
(10:46 -0800)
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>
net/ipv6/proc.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/proc.c
b/net/ipv6/proc.c
index 5ba7ae849d042c45ad970c9b0aa1a2acbf4ccc2c..2453f2229ef7b7ab805ccabc5fd892590216bef3 100644
(file)
--- 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;