summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-11-18 13:02:39 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2024-11-21 14:15:34 +0200
commite8e72e27a7f45607e75cb68b836108213481e1b8 (patch)
treec6b789830e6d301a45df0488d7675706ae4f72c9 /data/templates/accel-ppp
parentc6a097ee7d9b6d2f4c4b8ee63ca45ccfb6fdda34 (diff)
downloadvyos-1x-e8e72e27a7f45607e75cb68b836108213481e1b8.tar.gz
vyos-1x-e8e72e27a7f45607e75cb68b836108213481e1b8.zip
ipoe_server: T6872: Add the ability to configure LUA scripts and username
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/ipoe.config.j26
1 files changed, 5 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.j2 b/data/templates/accel-ppp/ipoe.config.j2
index 81f63c53b..a10dcf2c1 100644
--- a/data/templates/accel-ppp/ipoe.config.j2
+++ b/data/templates/accel-ppp/ipoe.config.j2
@@ -38,6 +38,9 @@ level={{ log.level }}
[ipoe]
verbose=1
+{% if lua_file is vyos_defined %}
+lua-file={{ lua_file }}
+{% endif %}
{% if interface is vyos_defined %}
{% for iface, iface_config in interface.items() %}
{% set tmp = 'interface=' %}
@@ -55,7 +58,8 @@ verbose=1
{% set range = 'range=' ~ iface_config.client_subnet ~ ',' if iface_config.client_subnet is vyos_defined else '' %}
{% 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 }}
+{% set username = ',' ~ 'username=lua:' ~ iface_config.lua_username if iface_config.lua_username is vyos_defined else '' %}
+{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1{{ relay }}{{ giaddr }}{{ username }}
{% if iface_config.vlan_mon is vyos_defined %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{% endif %}