aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 22571488730a..f1c0c2e9cad5 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2987,6 +2987,10 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2987 t->neigh_vars[NEIGH_VAR_BASE_REACHABLE_TIME_MS].extra1 = dev; 2987 t->neigh_vars[NEIGH_VAR_BASE_REACHABLE_TIME_MS].extra1 = dev;
2988 } 2988 }
2989 2989
2990 /* Don't export sysctls to unprivileged users */
2991 if (neigh_parms_net(p)->user_ns != &init_user_ns)
2992 t->neigh_vars[0].procname = NULL;
2993
2990 snprintf(neigh_path, sizeof(neigh_path), "net/%s/neigh/%s", 2994 snprintf(neigh_path, sizeof(neigh_path), "net/%s/neigh/%s",
2991 p_name, dev_name_source); 2995 p_name, dev_name_source);
2992 t->sysctl_header = 2996 t->sysctl_header =