Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b194c1f1 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

neigh: fix setting of default gc_* values



This patch fixes bug introduced by:
commit 1d4c8c29
"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: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f5ddcbbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3046,7 +3046,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
	if (!t)
	if (!t)
		goto err;
		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].data += (long) p;
		t->neigh_vars[i].extra1 = dev;
		t->neigh_vars[i].extra1 = dev;
		t->neigh_vars[i].extra2 = p;
		t->neigh_vars[i].extra2 = p;