diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2021-12-06 19:41:55 +0000 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2021-12-07 17:36:43 +0000 |
commit | 3b6504d4bfc8a7f19613ee32fef5242711ca390a (patch) | |
tree | 6acb188a1441f7df9620e19b9b6a71a8ee5f7234 /data | |
parent | ae16a51506cdc4de8e18f4678b8f55654d4abbba (diff) | |
download | vyos-1x-3b6504d4bfc8a7f19613ee32fef5242711ca390a.tar.gz vyos-1x-3b6504d4bfc8a7f19613ee32fef5242711ca390a.zip |
pppoe-server: T3006: Add range to regex generator
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.tmpl | 18 |
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 %} |