• J
    neighbour: fix base_reachable_time(_ms) not effective immediatly when changed · 4bf6980d
    Jean-Francois Remy 提交于
    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: NJean-Francois Remy <jeff@melix.org>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    4bf6980d
neighbour.c 76.9 KB