]> git.baikalelectronics.ru Git - kernel.git/commit
net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter
authorJames Prestwood <prestwoj@gmail.com>
Mon, 1 Nov 2021 17:36:29 +0000 (10:36 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Nov 2021 02:57:14 +0000 (19:57 -0700)
commit9616f125ed8545bb60fe4944e0ec02772727473b
treeba2a2bfbb0b0cac7991ac8e0c0fe9656357dc6b6
parent0ad016299a3c8181dc27bf80eb27a8f542a7603e
net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter

In most situations the neighbor discovery cache should be cleared on a
NOCARRIER event which is currently done unconditionally. But for wireless
roams the neighbor discovery cache can and should remain intact since
the underlying network has not changed.

This patch introduces a sysctl option ndisc_evict_nocarrier which can
be disabled by a wireless supplicant during a roam. This allows packets
to be sent after a roam immediately without having to wait for
neighbor discovery.

A user reported roughly a 1 second delay after a roam before packets
could be sent out (note, on IPv4). This delay was due to the ARP
cache being cleared. During testing of this same scenario using IPv6
no delay was noticed, but regardless there is no reason to clear
the ndisc cache for wireless roams.

Signed-off-by: James Prestwood <prestwoj@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/ip-sysctl.rst
include/linux/ipv6.h
include/uapi/linux/ipv6.h
net/ipv6/addrconf.c
net/ipv6/ndisc.c