diff options
author | Jean-Francois Remy <jeff@melix.org> | 2015-01-14 06:22:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-14 08:28:00 +0300 |
commit | 4bf6980dd0328530783fd657c776e3719b421d30 (patch) | |
tree | ebfdd64060a02dd8cee743e27f06a95e598e136a /net/phonet | |
parent | 3d125f9c91c599a77ac3cb8f05113a6c8df99cbe (diff) | |
download | linux-4bf6980dd0328530783fd657c776e3719b421d30.tar.xz |
neighbour: fix base_reachable_time(_ms) not effective immediatly when changed
When setting base_reachable_time or base_reachable_time_ms on a
specific interface through sysctl or netlink, the reachable_time
value is not updated.
This means that neighbour entries will continue to be updated using the
old value until it is recomputed in neigh_period_work (which
recomputes the value every 300*HZ).
On systems with HZ equal to 1000 for instance, it means 5mins before
the change is effective.
This patch changes this behavior by recomputing reachable_time after
each set on base_reachable_time or base_reachable_time_ms.
The new value will become effective the next time the neighbour's timer
is triggered.
Changes are made in two places: the netlink code for set and the sysctl
handling code. For sysctl, I use a proc_handler. The ipv6 network
code does provide its own handler but it already refreshes
reachable_time correctly so it's not an issue.
Any other user of neighbour which provide its own handlers must
refresh reachable_time.
Signed-off-by: Jean-Francois Remy <jeff@melix.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
0 files changed, 0 insertions, 0 deletions