diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-03-12 09:35:41 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-03-12 09:35:41 +0000 |
commit | 4eccfe6a19b457720ece4ab9a66b10a95f34b635 (patch) | |
tree | 91cf75039ca235fbdfeb86215371c7bf026a2987 /data/templates | |
parent | f2f78ac796322a398c43a5c418d4563c4d34b23d (diff) | |
download | vyos-1x-4eccfe6a19b457720ece4ab9a66b10a95f34b635.tar.gz vyos-1x-4eccfe6a19b457720ece4ab9a66b10a95f34b635.zip |
T5057: Fix IPoE regex Jinja2 for interface
Fix incorrect regex '\d+' when used vlan ranges
For example 'ipoe-server interface eth1 vlan 2000-3000'
- replace 'interface=re:eth1\.\d+'
=> 'interface=re:^eth1\.(200\d|20[1-9]\d|2[1-9]\d{2}|3000)$'
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/accel-ppp/ipoe.config.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.tmpl b/data/templates/accel-ppp/ipoe.config.tmpl index 476c922b8..0599b5501 100644 --- a/data/templates/accel-ppp/ipoe.config.tmpl +++ b/data/templates/accel-ppp/ipoe.config.tmpl @@ -26,7 +26,7 @@ verbose=1 {% for interface in interfaces %} {% set ifname = interface.name %} {% if interface.vlan_mon %} -{% set ifname = 're:' ~ interface.name ~ '\.\d+' %} +{% set ifname = 're:^' ~ interface.name ~ '\.' ~ interface.vlan_mon | range_to_regex ~ '$' %} {% endif %} interface={{ ifname }},shared={{ interface.shared }},mode={{ interface.mode }},ifcfg={{ interface.ifcfg }}{{ ',range=' ~ interface.range if interface.range is defined and interface.range is not none }},start={{ interface.sess_start }},ipv6=1 {% endfor %} |