summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-12-08 01:55:10 +0700
committerGitHub <noreply@github.com>2021-12-08 01:55:10 +0700
commit7ac6b589e3827ea6ff8e796bb6617c021cf26bca (patch)
tree52a82a471ab87e35625dd139197035bf69e8751e /data/templates/accel-ppp
parent7af98b0bb9190f37b5d27da6ffc8343a7138106b (diff)
parent3b6504d4bfc8a7f19613ee32fef5242711ca390a (diff)
downloadvyos-1x-7ac6b589e3827ea6ff8e796bb6617c021cf26bca.tar.gz
vyos-1x-7ac6b589e3827ea6ff8e796bb6617c021cf26bca.zip
Merge pull request #1100 from DmitriyEshenko/sg-1x-03122021-02
pppoe-server: T3006: Add range to regex generator
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl18
1 files changed, 8 insertions, 10 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index 238e7ee15..0a8e0079b 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -108,19 +108,17 @@ ac-name={{ access_concentrator }}
{% if iface_config.vlan_id is not defined and iface_config.vlan_range is not defined %}
interface={{ iface }}
{% endif %}
-{% if iface_config.vlan_id is defined and iface_config.vlan_range is not defined %}
-{% for vlan in iface_config.vlan_id %}
-interface={{ iface }}.{{ vlan }}
-vlan-mon={{ iface }},{{ vlan }}
+{% if iface_config.vlan_range is defined %}
+{% for regex in iface_config.regex %}
+interface=re:^{{ iface | replace('.', '\\.') }}\.({{ regex }})$
{% endfor %}
-{% endif %}
-{% if iface_config.vlan_range is defined and iface_config.vlan_id is not defined %}
vlan-mon={{ iface }},{{ iface_config.vlan_range | join(',') }}
-interface=re:{{ iface | replace('.', '\\.') }}\.\d+
{% endif %}
-{% if iface_config.vlan_id is defined and iface_config.vlan_range is defined %}
-vlan-mon={{ iface }},{{ iface_config.vlan_id | join(',') }},{{ iface_config.vlan_range | join(',') }}
-interface=re:{{ iface | replace('.', '\\.') }}\.\d+
+{% if iface_config.vlan_id is defined %}
+{% for vlan in iface_config.vlan_id %}
+vlan-mon={{ iface }},{{ vlan }}
+interface=re:^{{ iface | replace('.', '\\.') }}\.{{ vlan }}$
+{% endfor %}
{% endif %}
{% endfor %}
{% endif %}