diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-28 17:19:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 17:19:18 +0100 |
commit | f585fd497ad0daa4cbecd777bb5e8fa6d18f879f (patch) | |
tree | 4fd323036f1cf428e7c654a66fe5e5dd7e1c9010 /data/templates | |
parent | 04724ed189553ce43f8504f68fef8024ef5796de (diff) | |
parent | cf93fec3b38ac3df5d2e77dc1ae8c37bb6971d83 (diff) | |
download | vyos-1x-f585fd497ad0daa4cbecd777bb5e8fa6d18f879f.tar.gz vyos-1x-f585fd497ad0daa4cbecd777bb5e8fa6d18f879f.zip |
Merge pull request #754 from sever-sever/T3353
pppoe: T3353: Modify template for vlan-mon and interface
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.tmpl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl index 3dfb615da..9d5d58bec 100644 --- a/data/templates/accel-ppp/pppoe.config.tmpl +++ b/data/templates/accel-ppp/pppoe.config.tmpl @@ -96,12 +96,22 @@ mtu={{ mtu }} verbose=1 ac-name={{ access_concentrator }} -{% if interface %} -{% for iface in interface %} +{% if interface is defined and interface is not none %} +{% for iface, iface_config in interface.items() %} +{% if iface_config.vlan_id is not defined and iface_config.vlan_range is not defined %} interface={{ iface }} -{% if interface[iface].vlan_id is defined or interface[iface].vlan_range is defined %} -vlan-mon={{ iface }},{{ interface[iface].vlan_id | join(',') }},{{ interface[iface].vlan_range | join(',') }} -interface=re:{{ interface.name }}\.\d+ +{% endif %} +{% if iface_config.vlan_id is defined and iface_config.vlan_range is not defined %} +vlan-mon={{ iface }},{{ iface_config.vlan_id | join(',') }} +interface=re:{{ iface | replace('.', '\\.') }}\.\d+ +{% 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+ {% endif %} {% endfor %} {% endif %} |