### Autogenerated by service_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() %}
{%     if config.address is vyos_defined %}
{%         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 vyos_defined }}"