summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-08-31 22:29:12 +0200
committerChristian Poessinger <christian@poessinger.com>2018-08-31 22:29:52 +0200
commit6ba2186d7aad2f609a2197057f8404d7be30f2ac (patch)
tree9423d1284aadb049a6af9a37a30031fd7a42bd56 /python/vyos
parent9a16fd2cdb81a952608f5bda481e46ef915a82e3 (diff)
downloadvyos-1x-6ba2186d7aad2f609a2197057f8404d7be30f2ac.tar.gz
vyos-1x-6ba2186d7aad2f609a2197057f8404d7be30f2ac.zip
vyos: package: bugfix in validate.py for is_subnet_connected()
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/validate.py5
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 :(