From 6ba2186d7aad2f609a2197057f8404d7be30f2ac Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 31 Aug 2018 22:29:12 +0200 Subject: vyos: package: bugfix in validate.py for is_subnet_connected() --- python/vyos/validate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/vyos/validate.py b/python/vyos/validate.py index b681edc5e..1b77f196a 100644 --- a/python/vyos/validate.py +++ b/python/vyos/validate.py @@ -68,7 +68,8 @@ def is_subnet_connected(subnet, primary=False): system. primary check if the subnet is reachable via the primary IP address of this - interface. E.g. ISC DHCP can only listen on primary addresses. + interface, or in other words has a broadcast address configured. ISC DHCP + for instance will complain if it should listen on non broadcast interfaces. Return True/False """ @@ -81,7 +82,7 @@ def is_subnet_connected(subnet, primary=False): for interface in netifaces.interfaces(): # check if the requested address type is configured at all if addr_type not in netifaces.ifaddresses(interface).keys(): - return False + continue # An interface can have multiple addresses, but some software components # only support the primary address :( -- cgit v1.2.3