summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Polte <77445745+Niklasthegeek@users.noreply.github.com>2023-09-03 09:25:06 +0200
committerGitHub <noreply@github.com>2023-09-03 09:25:06 +0200
commit1ae9c4162dc13844ec0f028a51b4b2d111954196 (patch)
treea8fe6476804e703ac3ba142bdcb10623b7d7d34b
parentb295a1470b04904749403bdded1758e382493535 (diff)
downloadvyos-1x-1ae9c4162dc13844ec0f028a51b4b2d111954196.tar.gz
vyos-1x-1ae9c4162dc13844ec0f028a51b4b2d111954196.zip
ipoe: T5542: fix Jinja2 template and add missing dhcp relay config
-rw-r--r--data/templates/accel-ppp/ipoe.config.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.j2 b/data/templates/accel-ppp/ipoe.config.j2
index add3dc7e4..f59428509 100644
--- a/data/templates/accel-ppp/ipoe.config.j2
+++ b/data/templates/accel-ppp/ipoe.config.j2
@@ -36,7 +36,9 @@ verbose=1
{% set shared = 'shared=0,' %}
{% endif %}
{% set range = 'range=' ~ iface_config.client_subnet ~ ',' if iface_config.client_subnet is vyos_defined else '' %}
-{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1
+{% set relay = ',' ~ 'relay=' ~ iface_config.external_dhcp.dhcp_relay if iface_config.external_dhcp.dhcp_relay is vyos_defined else '' %}
+{% set giaddr = ',' ~ 'giaddr=' ~ iface_config.external_dhcp.giaddr if iface_config.external_dhcp.giaddr is vyos_defined else '' %}
+{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1{{ relay }}{{ giaddr }}
{% if iface_config.vlan is vyos_defined %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{% endif %}