Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: test_vxlan_under_vrf: fix HV connectivity test

It looks like test_vxlan_under_vrf.sh is always failing to verify the
connectivity test during the ping between the two simulated VMs.

This is due to the fact that veth-hv in each VM should have a distinct
MAC address.

Fix by setting a unique MAC address on each simulated VM interface.

Without this fix:

$ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
Checking HV connectivity [ OK ]
Check VM connectivity through VXLAN (underlay in the default VRF) [FAIL]

With this fix applied:

$ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
Checking HV connectivity [ OK ]
Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ]
Check VM connectivity through VXLAN (underlay in a VRF) [FAIL]

NOTE: the connectivity test with the underlay VRF is still failing; it
seems that ARP requests are blocked at the simulated hypervisor level,
probably due to some missing ARP forwarding rules. This requires more
investigation (in the meantime we may consider to set that test as
expected failure - XFAIL).

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrea Righi and committed by
David S. Miller
e7e4785f 1413ff13

+2
+2
tools/testing/selftests/net/test_vxlan_under_vrf.sh
··· 101 101 ip -netns hv-$id link set veth-tap master br0 102 102 ip -netns hv-$id link set veth-tap up 103 103 104 + ip link set veth-hv address 02:1d:8d:dd:0c:6$id 105 + 104 106 ip link set veth-hv netns vm-$id 105 107 ip -netns vm-$id addr add 10.0.0.$id/24 dev veth-hv 106 108 ip -netns vm-$id link set veth-hv up