summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-11-26 07:51:38 +0100
committerGitHub <noreply@github.com>2024-11-26 07:51:38 +0100
commit2ad3c2860cd19708118d3328106e51605f96c288 (patch)
tree7d366d9f6f6e31a8677f7378be469cdf315459cc /data
parentf3a46fc296a488b3748182288b1cff4df39c4971 (diff)
parente8e72e27a7f45607e75cb68b836108213481e1b8 (diff)
downloadvyos-1x-2ad3c2860cd19708118d3328106e51605f96c288.tar.gz
vyos-1x-2ad3c2860cd19708118d3328106e51605f96c288.zip
Merge pull request #4196 from natali-rs1985/T6872
ipoe_server: T6872: Add the ability to configure LUA scripts and username
Diffstat (limited to 'data')
-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 %}