selftests: forwarding: Delete IPv6 address at the end
authorIdo Schimmel <idosch@mellanox.com>
Mon, 9 Dec 2019 06:56:34 +0000 (08:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:41:36 +0000 (16:41 +0100)
commit37a56610e96d71d976d989ed70a5a4fc9d07f66a
tree0859b0961371f91ba588355dec3b3f2212bfc7dc
parentcbf89ebfc053edebaedb266cb1d54b642ce0318b
selftests: forwarding: Delete IPv6 address at the end

[ Upstream commit 65cb13986229cec02635a1ecbcd1e2dd18353201 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/forwarding/router_bridge_vlan.sh