summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-04-16 11:15:56 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2024-04-16 11:15:56 +0300
commit82fdbedb79cf1c0a253657dfe7f23dee58c0dd47 (patch)
tree457f430babfa3aab6a2508720ab9bb0177583899 /data
parent0aabfbbbf5619a11c4a9d4a9eb4ed402ce62d51b (diff)
downloadvyos-1x-82fdbedb79cf1c0a253657dfe7f23dee58c0dd47.tar.gz
vyos-1x-82fdbedb79cf1c0a253657dfe7f23dee58c0dd47.zip
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails
Diffstat (limited to 'data')
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index 3e5c64eb8..08f82996b 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -126,12 +126,13 @@ 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 }}