]> 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)
commit4b983f6ae54d50f7e0b430f530ba7d786c81caf3
treeba2a2bfbb0b0cac7991ac8e0c0fe9656357dc6b6
parent0ee16da5e53e7feb23d85d08ea4530c48f6cce9e
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