When a learning VXLAN device snoops a known MAC from another VTEP, it
rewrites the remote's IP address in place but keeps the remote's
dst_cache and remote_ifindex. Traffic to the moved MAC can then use the
route cached for the previous remote and be blackholed. Patch 1 updates
the remote the way vxlan_fdb_replace() does. Patch 2 adds a selftest
for both cases.
The selftest fails both cases on net without patch 1 (8 of 8 runs with
1, 2 and 4 CPUs) and passes them with it (16 of 16 runs).
v4:
- add the selftest (Nicolas Dichtel)
v3: https://lore.kernel.org/netdev/20261111180001.2475-1-ilskdw@gmail.com/ (local)
- use my real name in From: and Signed-off-by:
v2: https://lore.kernel.org/netdev/20261110153020.9635-1-ilskdw@gmail.com/ (local)
- also update remote_ifindex and clear offloaded, as vxlan_fdb_replace() does
- add the IPv6 link-local case to the changelog and a second Fixes tag
v1: https://lore.kernel.org/netdev/20261106144406.66035-1-ilskdw@gmail.com/ (local)
Zhefu Peng (2):
vxlan: reset the remote's dst cache when snooping moves a MAC
selftests: net: add a test for vxlan snooping moving a MAC
drivers/net/vxlan/vxlan_core.c | 3 +
tools/testing/selftests/net/Makefile | 1 +
.../selftests/net/test_vxlan_snoop_move.sh | 161 ++++++++++++++++++
3 files changed, 165 insertions(+)
create mode 100755 tools/testing/selftests/net/test_vxlan_snoop_move.sh
--
2.54.0