summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-relay/dhcrelay.conf.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-16 12:14:43 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-16 12:14:43 +0200
commitcb014d8818a864512680f57953d6f21ad5467e59 (patch)
tree033db927a4843cdc7ad3b993bb013d94e18d40c3 /data/templates/dhcp-relay/dhcrelay.conf.j2
parent67fa67af916df1cf388af5ef1f1f7a9fd7a81bdb (diff)
downloadvyos-1x-cb014d8818a864512680f57953d6f21ad5467e59.tar.gz
vyos-1x-cb014d8818a864512680f57953d6f21ad5467e59.zip
dhcp(v6)-relay: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/dhcp-relay/dhcrelay.conf.j2')
-rw-r--r--data/templates/dhcp-relay/dhcrelay.conf.j26
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/dhcp-relay/dhcrelay.conf.j2 b/data/templates/dhcp-relay/dhcrelay.conf.j2
new file mode 100644
index 000000000..11710bd8e
--- /dev/null
+++ b/data/templates/dhcp-relay/dhcrelay.conf.j2
@@ -0,0 +1,6 @@
+### Autogenerated by dhcp_relay.py ###
+
+{% 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(' ') }}"
+