]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: test_bridge_neigh_suppress.sh: Fix failures due to duplicate MAC
authorIdo Schimmel <idosch@nvidia.com>
Tue, 7 May 2024 11:30:33 +0000 (14:30 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:23 +0000 (12:02 +0200)
commit438d7ceb45233a1313f52d2fbc876b419f45d2ae
treeff4787e00860b740f0ee61558657860a418a0735
parent2ee2fc6786bc5ff3c24798624ea3806c9662c26f
selftests: test_bridge_neigh_suppress.sh: Fix failures due to duplicate MAC

[ Upstream commit 9a169c267e946b0f47f67e8ccc70134708ccf3d4 ]

When creating the topology for the test, three veth pairs are created in
the initial network namespace before being moved to one of the network
namespaces created by the test.

On systems where systemd-udev uses MACAddressPolicy=persistent (default
since systemd version 242), this will result in some net devices having
the same MAC address since they were created with the same name in the
initial network namespace. In turn, this leads to arping / ndisc6
failing since packets are dropped by the bridge's loopback filter.

Fix by creating each net device in the correct network namespace instead
of moving it there from the initial network namespace.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20240426074015.251854d4@kernel.org/
Fixes: 7648ac72dcd7 ("selftests: net: Add bridge neighbor suppression test")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240507113033.1732534-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/test_bridge_neigh_suppress.sh