summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-29 20:32:22 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-29 20:32:22 +0100
commitbced875d720277fa91d0da629466447fc22e83c6 (patch)
tree92a933dd97f8e4c3d240cd77579d04a1ae09529d /data/templates
parentea3c4544634a9d916deff4bd6cdce1522d395a0d (diff)
downloadvyos-1x-bced875d720277fa91d0da629466447fc22e83c6.tar.gz
vyos-1x-bced875d720277fa91d0da629466447fc22e83c6.zip
dhcpv6-relay: T3095: improve verify()
- Upstream interfaces require a DHCPv6 server to be configured - Listen interface must have a a global unicast address assigned, else ISC dhcrelay won't start.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/dhcp-relay/dhcrelay6.conf.tmpl6
1 files changed, 5 insertions, 1 deletions
diff --git a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl
index 165216592..58c216b7c 100644
--- a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl
+++ b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl
@@ -10,7 +10,11 @@
{# listen_interface is mandatory so it's always present #}
{% set listen = namespace(value='') %}
{% for interface, config in listen_interface.items() %}
-{% set listen.value = listen.value + '-l ' + config.address + '%' + interface + ' ' %}
+{% if config.address is defined and config.address is not none %}
+{% set listen.value = listen.value + '-l ' + config.address + '%' + interface + ' ' %}
+{% else %}
+{% set listen.value = listen.value + '-l ' + interface + ' ' %}
+{% endif %}
{% endfor %}
OPTIONS="{{ listen.value }} {{ upstream.value }} -c {{ max_hop_count }} {{ '-I' if use_interface_id_option is defined }}"