summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-relay
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/dhcp-relay')
-rw-r--r--data/templates/dhcp-relay/dhcrelay6.conf.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl
new file mode 100644
index 000000000..165216592
--- /dev/null
+++ b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl
@@ -0,0 +1,17 @@
+### Autogenerated by dhcpv6_relay.py ###
+
+{# upstream_interface is mandatory so it's always present #}
+{% set upstream = namespace(value='') %}
+{% for interface, config in upstream_interface.items() %}
+{% for address in config.address %}
+{% set upstream.value = upstream.value + '-u ' + address + '%' + interface + ' ' %}
+{% endfor %}
+{% endfor %}
+{# 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 + ' ' %}
+{% endfor %}
+
+OPTIONS="{{ listen.value }} {{ upstream.value }} -c {{ max_hop_count }} {{ '-I' if use_interface_id_option is defined }}"
+