diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-04-08 18:54:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 18:54:44 +0300 |
commit | f43031ec4591662fadee3176fe1ace2ac018a9df (patch) | |
tree | 9c96321f2432ee11db826a7051b4b5adefc030c5 /data/templates/dhcp-relay | |
parent | b75b351b7dd2ec87407f98668468b1fc146428bf (diff) | |
parent | 2bf7589e926b3d5f2f7aee0f98505eeb14fc826d (diff) | |
download | vyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.tar.gz vyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.zip |
Merge branch 'current' into T4344
Diffstat (limited to 'data/templates/dhcp-relay')
-rw-r--r-- | data/templates/dhcp-relay/dhcrelay.conf.tmpl | 2 | ||||
-rw-r--r-- | data/templates/dhcp-relay/dhcrelay6.conf.tmpl | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/data/templates/dhcp-relay/dhcrelay.conf.tmpl b/data/templates/dhcp-relay/dhcrelay.conf.tmpl index a9d17ed9a..11710bd8e 100644 --- a/data/templates/dhcp-relay/dhcrelay.conf.tmpl +++ b/data/templates/dhcp-relay/dhcrelay.conf.tmpl @@ -1,6 +1,6 @@ ### Autogenerated by dhcp_relay.py ### -{% set max_size = '-A ' + relay_options.max_size if relay_options.max_size is defined and relay_options.max_size is not none %} +{% set max_size = '-A ' ~ relay_options.max_size if relay_options.max_size is vyos_defined %} {# hop_count and relay_agents_packets is a default option, thus it is always present #} OPTIONS="-c {{ relay_options.hop_count }} -a -m {{ relay_options.relay_agents_packets }} {{ max_size }} -i {{ interface | join(' -i ') }} {{ server | join(' ') }}" diff --git a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl index 58c216b7c..1fd5de18c 100644 --- a/data/templates/dhcp-relay/dhcrelay6.conf.tmpl +++ b/data/templates/dhcp-relay/dhcrelay6.conf.tmpl @@ -4,18 +4,18 @@ {% set upstream = namespace(value='') %} {% for interface, config in upstream_interface.items() %} {% for address in config.address %} -{% set upstream.value = upstream.value + '-u ' + address + '%' + interface + ' ' %} +{% 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 defined and config.address is not none %} -{% set listen.value = listen.value + '-l ' + config.address + '%' + interface + ' ' %} +{% if config.address is vyos_defined %} +{% set listen.value = listen.value ~ '-l ' ~ config.address ~ '%' ~ interface ~ ' ' %} {% else %} -{% set listen.value = listen.value + '-l ' + interface + ' ' %} +{% 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 }}" +OPTIONS="{{ listen.value }} {{ upstream.value }} -c {{ max_hop_count }} {{ '-I' if use_interface_id_option is vyos_defined }}" |