Commit 9a169c26 authored by Ido Schimmel's avatar Ido Schimmel Committed by Jakub Kicinski

selftests: test_bridge_neigh_suppress.sh: Fix failures due to duplicate MAC

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: default avatarJakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20240426074015.251854d4@kernel.org/
Fixes: 7648ac72 ("selftests: net: Add bridge neighbor suppression test")
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240507113033.1732534-1-idosch@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4e13d3a9
...@@ -154,17 +154,9 @@ setup_topo() ...@@ -154,17 +154,9 @@ setup_topo()
setup_topo_ns $ns setup_topo_ns $ns
done done
ip link add name veth0 type veth peer name veth1 ip -n $h1 link add name eth0 type veth peer name swp1 netns $sw1
ip link set dev veth0 netns $h1 name eth0 ip -n $sw1 link add name veth0 type veth peer name veth0 netns $sw2
ip link set dev veth1 netns $sw1 name swp1 ip -n $h2 link add name eth0 type veth peer name swp1 netns $sw2
ip link add name veth0 type veth peer name veth1
ip link set dev veth0 netns $sw1 name veth0
ip link set dev veth1 netns $sw2 name veth0
ip link add name veth0 type veth peer name veth1
ip link set dev veth0 netns $h2 name eth0
ip link set dev veth1 netns $sw2 name swp1
} }
setup_host_common() setup_host_common()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment