Skip to content

Commit b194c1f

Browse files
jpirkodavem330
authored andcommitted
neigh: fix setting of default gc_* values
This patch fixes bug introduced by: commit 1d4c8c2 "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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f5ddcbb commit b194c1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/neighbour.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3046,7 +3046,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
30463046
if (!t)
30473047
goto err;
30483048

3049-
for (i = 0; i < ARRAY_SIZE(t->neigh_vars); i++) {
3049+
for (i = 0; i < NEIGH_VAR_GC_INTERVAL; i++) {
30503050
t->neigh_vars[i].data += (long) p;
30513051
t->neigh_vars[i].extra1 = dev;
30523052
t->neigh_vars[i].extra2 = p;

0 commit comments

Comments
 (0)