diff options
author | hagbard <vyosdev@derith.de> | 2018-09-01 08:45:34 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2018-09-01 08:45:34 -0700 |
commit | 504e4024c9afddb7054a0369f0f0eaf2dc044e1b (patch) | |
tree | 7a1877202346898de04fe8f45d348f1da9c93b02 /python/vyos | |
parent | c2c05c74deaaee6ec222cf09345b7e79ab8adcd2 (diff) | |
parent | d48e5d8d196365862feae6943e97cbc803469cbb (diff) | |
download | vyos-1x-504e4024c9afddb7054a0369f0f0eaf2dc044e1b.tar.gz vyos-1x-504e4024c9afddb7054a0369f0f0eaf2dc044e1b.zip |
Merge remote-tracking branch 'upstream/current' into T793
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/validate.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 :( |