aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sysctl_net_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
-rw-r--r--net/ipv6/sysctl_net_ipv6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index e85c48bd404f..b06fd078e6c7 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -52,6 +52,10 @@ static int __net_init ipv6_sysctl_net_init(struct net *net)
52 goto out; 52 goto out;
53 ipv6_table[0].data = &net->ipv6.sysctl.bindv6only; 53 ipv6_table[0].data = &net->ipv6.sysctl.bindv6only;
54 54
55 /* Don't export sysctls to unprivileged users */
56 if (net->user_ns != &init_user_ns)
57 ipv6_table[0].procname = NULL;
58
55 ipv6_route_table = ipv6_route_sysctl_init(net); 59 ipv6_route_table = ipv6_route_sysctl_init(net);
56 if (!ipv6_route_table) 60 if (!ipv6_route_table)
57 goto out_ipv6_table; 61 goto out_ipv6_table;