diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 846aec8e0093..d15a9e3aa24a 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -6453,6 +6453,15 @@ struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) return table; } + +size_t ipv6_route_sysctl_table_size(struct net *net) +{ + /* Don't export sysctls to unprivileged users */ + if (net->user_ns != &init_user_ns) + return 1; + + return ARRAY_SIZE(ipv6_route_table_template); +} #endif static int __net_init ip6_route_net_init(struct net *net) |