From 4eccfe6a19b457720ece4ab9a66b10a95f34b635 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Sun, 12 Mar 2023 09:35:41 +0000 Subject: 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)$' --- data/templates/accel-ppp/ipoe.config.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates') 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 %} -- cgit v1.2.3