From 484446984295d3122ead42e93288222d8b4e3ccb Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Fri, 13 Sep 2019 14:42:18 +0300 Subject: [PATCH] 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 Change-Id: Iff3d25a5701b96df9da75cf398fd19d29e5cfeda Closes-Bug: #1843889 --- neutron/agent/windows/ip_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/agent/windows/ip_lib.py b/neutron/agent/windows/ip_lib.py index ab838f17c9a..263c83cea45 100644 --- a/neutron/agent/windows/ip_lib.py +++ b/neutron/agent/windows/ip_lib.py @@ -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