summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-03-09 08:04:04 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-03-09 08:04:04 +0000
commit7310b1bf6553361b165c174336ab8e6a762ff0ef (patch)
treecb407dacf6eb68e49fada5508f0d8960403707f3 /data/templates/accel-ppp
parente1ea2f826ce7b9e8bfe6be4d3814a456e04963f1 (diff)
downloadvyos-1x-7310b1bf6553361b165c174336ab8e6a762ff0ef.tar.gz
vyos-1x-7310b1bf6553361b165c174336ab8e6a762ff0ef.zip
T5073: IPoE-server fix parse empty range option
If the 'client-subnet' is not used we must exclude it from the ipoe.config.j2 template. Otherwise we get wrong empty parameter ',range=,'
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/ipoe.config.j23
1 files changed, 2 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.j2 b/data/templates/accel-ppp/ipoe.config.j2
index 2a2367b69..27621bc9b 100644
--- a/data/templates/accel-ppp/ipoe.config.j2
+++ b/data/templates/accel-ppp/ipoe.config.j2
@@ -35,7 +35,8 @@ verbose=1
{% elif iface_config.network is vyos_defined('vlan') %}
{% set shared = 'shared=0,' %}
{% endif %}
-{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,range={{ iface_config.client_subnet }},start=dhcpv4,ipv6=1
+{% 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
{% if iface_config.vlan is vyos_defined %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{% endif %}