test: iface: Fix bug in function address_exist()

did not allow any other protocol to checked except DHCP
This commit is contained in:
Mattias Walström
2024-02-28 18:25:43 +01:00
committed by Joachim Wiberg
parent a730cc0439
commit ac97ce01a5
+1 -1
View File
@@ -40,7 +40,7 @@ def address_exist(target, iface, address, proto="dhcp"):
if not addrs:
return False
for addr in addrs:
if addr['origin'] == "dhcp" and addr['ip'] == address:
if addr['origin'] == proto and addr['ip'] == address:
return True
def get_ipv4_address(target, iface):