From 2aa9010d27eb3627e340ec55f4fdede346759ad4 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko <81954790+natali-rs1985@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:25:21 +0300 Subject: pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (#3296) (cherry picked from commit 6d8336f5ad2d9c4e0f12b54681db2924d6998d2d) --- data/templates/accel-ppp/pppoe.config.j2 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'data') 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 }} -- cgit v1.2.3