1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

LinkUtils: convert ip addrs to string before comparing them

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2019-07-13 16:02:49 +04:00
parent 89f5bbe52c
commit f5c47abf3d

View File

@@ -1012,13 +1012,13 @@ class LinkUtils(utilsBase):
obj = IPNetwork(ip)
if type(obj) == IPv6Network:
ip6.append(obj)
ip6.append(str(obj))
else:
ip4.append(obj)
ip4.append(str(obj))
running_ipobj = []
for ip in running_addrs or []:
running_ipobj.append(IPNetwork(ip))
running_ipobj.append(str(IPNetwork(ip)))
return running_ipobj == (ip4 + ip6)