Windows: Fix local adapter ipv6 check
ip_lib.IPDevice.device_has_ip doesn't include ipv6 addresses when checking if a local adapter is configured to use a certain address. This change fixes this issue, which will also allow using ipv6 tunnel endpoints. Co-authored-by: Alin Serdean <aserdean@cloudbasesolutions.com> Change-Id: Iff3d25a5701b96df9da75cf398fd19d29e5cfeda Closes-Bug: #1843889
This commit is contained in:
parent
8887343782
commit
4844469842
@ -63,7 +63,8 @@ class IPDevice(object):
|
||||
return False
|
||||
|
||||
addresses = [ip_addr['addr'] for ip_addr in
|
||||
device_addresses.get(netifaces.AF_INET, [])]
|
||||
device_addresses.get(netifaces.AF_INET, []) +
|
||||
device_addresses.get(netifaces.AF_INET6, [])]
|
||||
return ip in addresses
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user