tests: fix test_550_ipv6_spoof_ip

Use 'ip route replace' instead of 'ip route add' to not fail on already
existing route entry. This worked before only because of a race
condition with a network setup.
This commit is contained in:
Marek Marczykowski-Górecki 2020-11-25 00:16:19 +01:00
parent 7d8d0c10d1
commit 86ccbcc206
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -345,7 +345,7 @@ class VmIPv6NetworkingMixin(VmNetworkingMixin):
self.loop.run_until_complete(self.testvm1.run_for_stdio(
'ip -6 addr flush dev eth0 && '
'ip -6 addr add {}/128 dev eth0 && '
'ip -6 route add default via {} dev eth0'.format(
'ip -6 route replace default via {} dev eth0'.format(
str(self.testvm1.visible_ip6) + '1',
str(self.testvm1.visible_gateway6)),
user='root'))