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

selftests: forwarding: Delete IPv6 address at the end

When creating the second host in h2_create(), two addresses are assigned
to the interface, but only one is deleted. When running the test twice
in a row the following error is observed:

$ ./router_bridge_vlan.sh
TEST: ping [ OK ]
TEST: ping6 [ OK ]
TEST: vlan [ OK ]
$ ./router_bridge_vlan.sh
RTNETLINK answers: File exists
TEST: ping [ OK ]
TEST: ping6 [ OK ]
TEST: vlan [ OK ]

Fix this by deleting the address during cleanup.

Fixes: 5b1e7f9ebd56 ("selftests: forwarding: Test routed bridge interface")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ido Schimmel and committed by
David S. Miller
65cb1398 62201c00

+1 -1
+1 -1
tools/testing/selftests/net/forwarding/router_bridge_vlan.sh
··· 36 36 { 37 37 ip -6 route del 2001:db8:1::/64 vrf v$h2 38 38 ip -4 route del 192.0.2.0/28 vrf v$h2 39 - simple_if_fini $h2 192.0.2.130/28 39 + simple_if_fini $h2 192.0.2.130/28 2001:db8:2::2/64 40 40 } 41 41 42 42 router_create()