From 82fdbedb79cf1c0a253657dfe7f23dee58c0dd47 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Tue, 16 Apr 2024 11:15:56 +0300 Subject: pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails --- data/templates/accel-ppp/pppoe.config.tmpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'data/templates') 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 }} -- cgit v1.2.3