summaryrefslogtreecommitdiff
path: root/src/conf_mode/dhcpv6_relay.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-08-14 13:25:10 -0400
committerDaniil Baturin <daniil@baturin.org>2019-08-14 13:25:10 -0400
commit589952faadcf7700702b24390c1d654706f3a857 (patch)
treeb3d486d0b0bc9e08d706d16d852bcae60b504dc0 /src/conf_mode/dhcpv6_relay.py
parent4e781d4dec184308ac844a4c2ff7dcfc7832cc77 (diff)
parent8d1e768a6f3285ed717f588f356db9340871b043 (diff)
downloadvyos-1x-589952faadcf7700702b24390c1d654706f3a857.tar.gz
vyos-1x-589952faadcf7700702b24390c1d654706f3a857.zip
Merge branch 'current' into equuleus
Diffstat (limited to 'src/conf_mode/dhcpv6_relay.py')
-rwxr-xr-xsrc/conf_mode/dhcpv6_relay.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/conf_mode/dhcpv6_relay.py b/src/conf_mode/dhcpv6_relay.py
index 5868abe8a..ccabc901d 100755
--- a/src/conf_mode/dhcpv6_relay.py
+++ b/src/conf_mode/dhcpv6_relay.py
@@ -52,9 +52,10 @@ def get_config():
if conf.exists('listen-interface'):
interfaces = conf.list_nodes('listen-interface')
for intf in interfaces:
- addr = conf.return_value('listen-interface {0} address'.format(intf))
- listen = addr + '%' + intf
- relay['listen_addr'].append(listen)
+ if conf.exists('listen-interface {0} address'.format(intf)):
+ addr = conf.return_value('listen-interface {0} address'.format(intf))
+ listen = addr + '%' + intf
+ relay['listen_addr'].append(listen)
# Upstream interface/address for remote DHCPv6 server
if conf.exists('upstream-interface'):
@@ -82,7 +83,7 @@ def verify(relay):
return None
if len(relay['listen_addr']) == 0 or len(relay['upstream_addr']) == 0:
- raise ConfigError('Must set at least one listen and upstream interface.')
+ raise ConfigError('Must set at least one listen and upstream interface addresses.')
return None