summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-08-31 22:32:53 +0200
committerChristian Poessinger <christian@poessinger.com>2018-08-31 22:32:53 +0200
commit81e1cf8dbf02b95a89caa180f483a66655591d1a (patch)
tree77fc349be90e2ad0975ed0788f430a26bcf7f0de /python
parentc16a8fcb9dca029a233ca9365ad7791b1df495f1 (diff)
parent8a5c00e897a98e8a532a364b1178bd3317bffef9 (diff)
downloadvyos-1x-81e1cf8dbf02b95a89caa180f483a66655591d1a.tar.gz
vyos-1x-81e1cf8dbf02b95a89caa180f483a66655591d1a.zip
Merge branch 'dhcpv6-server-rewrite' into current
* dhcpv6-server-rewrite: T811: dhcpv6_server.py: add missing validators when comitting config changes dhcp_server.py: cleanup bcast_relay.py: remove obsolete import statement vyos: package: bugfix in validate.py for is_subnet_connected() T778: dhcpv6-server: XML and Python rewrite
Diffstat (limited to 'python')
-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 :(