summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-12-30 13:37:00 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-12-30 15:30:45 +0000
commitd53982112f26bbc07f9097c2c66b3e48d337e4dd (patch)
treea2082883c253f97316f5daea0d6d4e635ee350ca /data
parentc032f0a40486c581437f79313ad8b658f474ff40 (diff)
downloadvyos-1x-d53982112f26bbc07f9097c2c66b3e48d337e4dd.tar.gz
vyos-1x-d53982112f26bbc07f9097c2c66b3e48d337e4dd.zip
pppoe-server: T3162: Add generation pado-delay to jinja2 template
Diffstat (limited to 'data')
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl10
1 files changed, 9 insertions, 1 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index b39c4452d..3dfb615da 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -111,7 +111,15 @@ service-name={{ service_name | join(',') }}
{% endif %}
{% if pado_delay %}
-pado-delay={{ pado_delay }}
+{% set pado_delay_param = namespace(value='0') %}
+{% for delay in pado_delay|sort(attribute='0') %}
+{% if not loop.last %}
+{% set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + pado_delay[delay].sessions %}
+{% else %}
+{% set pado_delay_param.value = pado_delay_param.value + ',-1:' + pado_delay[delay].sessions %}
+{% endif %}
+{% endfor %}
+pado-delay={{ pado_delay_param.value }}
{% endif %}
{% if limits is defined %}