diff options
author | Nataliia Solomko <81954790+natali-rs1985@users.noreply.github.com> | 2024-04-12 12:25:21 +0300 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-12 10:14:38 +0000 |
commit | 2aa9010d27eb3627e340ec55f4fdede346759ad4 (patch) | |
tree | 3b8d55f175dfbbd5a77eb7bd8483ecc6bafdb702 /data/templates/accel-ppp | |
parent | 41ad411e11f608a7ded9bf0ce9cbffad8467aa5a (diff) | |
download | vyos-1x-2aa9010d27eb3627e340ec55f4fdede346759ad4.tar.gz vyos-1x-2aa9010d27eb3627e340ec55f4fdede346759ad4.zip |
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (#3296)
(cherry picked from commit 6d8336f5ad2d9c4e0f12b54681db2924d6998d2d)
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.j2 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.j2 b/data/templates/accel-ppp/pppoe.config.j2 index 6b01958e5..ddf0da518 100644 --- a/data/templates/accel-ppp/pppoe.config.j2 +++ b/data/templates/accel-ppp/pppoe.config.j2 @@ -64,12 +64,13 @@ vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }} service-name={{ service_name | join(',') }} {% endif %} {% if pado_delay %} -{% set pado_delay_param = namespace(value='0') %} -{% for delay in pado_delay | sort(attribute='0') %} +{% set delay_without_sessions = pado_delay.delays_without_sessions[0] | default('0') %} +{% set pado_delay_param = namespace(value=delay_without_sessions) %} +{% for delay, sessions in pado_delay.delays_with_sessions | sort(attribute='1') %} {% if not loop.last %} -{% set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + pado_delay[delay].sessions %} +{% set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + sessions | string %} {% else %} -{% set pado_delay_param.value = pado_delay_param.value + ',-1:' + pado_delay[delay].sessions %} +{% set pado_delay_param.value = pado_delay_param.value + ',-1:' + sessions | string %} {% endif %} {% endfor %} pado-delay={{ pado_delay_param.value }} |