diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-12 20:30:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 20:30:44 +0200 |
commit | 799864a177e429c782c4fa2ffc72b0a10cd23a5e (patch) | |
tree | c1723ba96d0a419fa21fb8078917059369ebdf3b /data | |
parent | 0a883649f7a181883a8d97d6ee82ce27856d6e13 (diff) | |
parent | 2aa9010d27eb3627e340ec55f4fdede346759ad4 (diff) | |
download | vyos-1x-799864a177e429c782c4fa2ffc72b0a10cd23a5e.tar.gz vyos-1x-799864a177e429c782c4fa2ffc72b0a10cd23a5e.zip |
Merge pull request #3299 from vyos/mergify/bp/sagitta/pr-3296
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (backport #3296)
Diffstat (limited to 'data')
-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 }} |