summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-02-21 14:52:57 +0100
committerDavid S. Miller <davem@davemloft.net>2014-02-22 06:08:10 +0100
commitb194c1f1dbd5f2671e49e0ac801b1b78dc7de93b (patch)
tree876415b1a6ede2c0cb37d4c06b60ba97b058e811 /net/core
parentnet-tcp: fastopen: fix high order allocations (diff)
downloadlinux-b194c1f1dbd5f2671e49e0ac801b1b78dc7de93b.tar.xz
linux-b194c1f1dbd5f2671e49e0ac801b1b78dc7de93b.zip
neigh: fix setting of default gc_* values
This patch fixes bug introduced by: commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca "neigh: restore old behaviour of default parms values" The thing is that in neigh_sysctl_register, extra1 and extra2 which were previously set for NEIGH_VAR_GC_* are overwritten. That leads to nonsense int limits for gc_* variables. So fix this by not touching extra* fields for gc_* variables. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index b9e9e0d38672..e1aa0f36cfe7 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3046,7 +3046,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
if (!t)
goto err;
- for (i = 0; i < ARRAY_SIZE(t->neigh_vars); i++) {
+ for (i = 0; i < NEIGH_VAR_GC_INTERVAL; i++) {
t->neigh_vars[i].data += (long) p;
t->neigh_vars[i].extra1 = dev;
t->neigh_vars[i].extra2 = p;