summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-07 11:09:15 +0100
committerGitHub <noreply@github.com>2023-03-07 11:09:15 +0100
commit9f0857c2e7821ea22d5132d6352ee8cbcb64b738 (patch)
treee3d4e8613b3aaceba2062b5c749fd4d137dcab3d
parentb7274923d8958a4b3df35cf3868f521e85319aa2 (diff)
parentdf82afa755454179d9699a9f1488477bdb84ec5d (diff)
downloadvyos-1x-9f0857c2e7821ea22d5132d6352ee8cbcb64b738.tar.gz
vyos-1x-9f0857c2e7821ea22d5132d6352ee8cbcb64b738.zip
Merge pull request #1872 from sever-sever/T5057
T5057: Fix IPoE regex Jinja2 for interface
-rw-r--r--data/templates/accel-ppp/ipoe.config.j211
1 files changed, 4 insertions, 7 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.j2 b/data/templates/accel-ppp/ipoe.config.j2
index 179f2277b..2a2367b69 100644
--- a/data/templates/accel-ppp/ipoe.config.j2
+++ b/data/templates/accel-ppp/ipoe.config.j2
@@ -25,7 +25,7 @@ verbose=1
{% for iface, iface_config in interface.items() %}
{% set tmp = 'interface=' %}
{% if iface_config.vlan is vyos_defined %}
-{% set tmp = tmp ~ 're:' ~ iface ~ '\.\d+' %}
+{% set tmp = tmp ~ 're:^' ~ iface ~ '\.' ~ iface_config.vlan | range_to_regex ~ '$' %}
{% else %}
{% set tmp = tmp ~ iface %}
{% endif %}
@@ -36,6 +36,9 @@ verbose=1
{% set shared = 'shared=0,' %}
{% endif %}
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,range={{ iface_config.client_subnet }},start=dhcpv4,ipv6=1
+{% if iface_config.vlan is vyos_defined %}
+vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
+{% endif %}
{% endfor %}
{% endif %}
{% if authentication.mode is vyos_defined('noauth') %}
@@ -54,12 +57,6 @@ password=csid
{% endif %}
proxy-arp=1
-{% for iface, iface_options in interface.items() %}
-{% if iface_options.network is vyos_defined('vlan') %}
-vlan-mon={{ iface }},{{ iface_options.vlan | join(',') }}
-{% endif %}
-{% endfor %}
-
{% if client_ip_pool.name is vyos_defined %}
[ip-pool]
{% for pool, pool_options in client_ip_pool.name.items() %}