summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNataliia Solomko <81954790+natali-rs1985@users.noreply.github.com>2024-04-12 12:25:21 +0300
committerGitHub <noreply@github.com>2024-04-12 10:25:21 +0100
commit6d8336f5ad2d9c4e0f12b54681db2924d6998d2d (patch)
treec844e967b53b31498694c44a6cb8b0b7019baa8d /data
parent041a57d69dc7b8d104b8e3a6e8b35723552a1b63 (diff)
downloadvyos-1x-6d8336f5ad2d9c4e0f12b54681db2924d6998d2d.tar.gz
vyos-1x-6d8336f5ad2d9c4e0f12b54681db2924d6998d2d.zip
pppoe-server: T6141: T5364: PPPoE-server add pado-delay without sessions fails (#3296)
Diffstat (limited to 'data')
-rw-r--r--data/templates/accel-ppp/pppoe.config.j29
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 }}