From 60dac377420082c151ff4be820777ab61434ca35 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 11 Oct 2020 19:55:10 +0200 Subject: [PATCH] ip_lib: Do not convert ip address scope into a boolean for checking The scope can be 0 which will remove it from the kwargs and not convert to the "global" (RT_SCOPE_UNIVERSE). Signed-off-by: Igor Raits --- neutron/agent/linux/ip_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/agent/linux/ip_lib.py b/neutron/agent/linux/ip_lib.py index 99fe71b538..213cd3c365 100644 --- a/neutron/agent/linux/ip_lib.py +++ b/neutron/agent/linux/ip_lib.py @@ -1362,7 +1362,7 @@ def get_devices_with_ip(namespace, name=None, **kwargs): if name: link_args['ifname'] = name scope = kwargs.pop('scope', None) - if scope: + if scope is not None: kwargs['scope'] = IP_ADDRESS_SCOPE_NAME[scope] devices = privileged.get_link_devices(namespace, **link_args) retval = [] -- 2.28.0