diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-11 06:48:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 06:48:06 +0100 |
commit | d0145bfc824099cb17ad6dc2cc2f81cace4f430d (patch) | |
tree | a439f0baf9a2d2310d72b58688cf0c30ba93f9c5 /data | |
parent | d0dcbfa475fae4817b0bc4d0718ecf65eae85270 (diff) | |
parent | b588e0784626ca42bf0da84a766213bda725305e (diff) | |
download | vyos-1x-d0145bfc824099cb17ad6dc2cc2f81cace4f430d.tar.gz vyos-1x-d0145bfc824099cb17ad6dc2cc2f81cace4f430d.zip |
Merge pull request #2789 from vyos/mergify/bp/sagitta/pr-2777
T5688: Changed 'range' to multi in 'client-ip-pool' for accell-ppp (backport #2777)
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/accel-ppp/config_ip_pool.j2 | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/data/templates/accel-ppp/config_ip_pool.j2 b/data/templates/accel-ppp/config_ip_pool.j2 index 6ac04e1a1..8e66486e6 100644 --- a/data/templates/accel-ppp/config_ip_pool.j2 +++ b/data/templates/accel-ppp/config_ip_pool.j2 @@ -12,16 +12,20 @@ gw-ip-address={{ gateway_address }} {% endif %} {% for pool in ordered_named_pools %} {% for pool_name, pool_config in pool.items() %} -{% set iprange_str = pool_config.range %} -{% set iprange_list = pool_config.range.split('-') %} -{% if iprange_list | length == 2 %} -{% set last_ip_oct = iprange_list[1].split('.') %} -{% set iprange_str = iprange_list[0] + '-' + last_ip_oct[last_ip_oct | length - 1] %} -{% endif %} -{% if pool_config.next_pool is vyos_defined %} +{% if pool_config.range is vyos_defined %} +{% for range in pool_config.range %} +{% set iprange_str = range %} +{% set iprange_list = range.split('-') %} +{% if iprange_list | length == 2 %} +{% set last_ip_oct = iprange_list[1].split('.') %} +{% set iprange_str = iprange_list[0] + '-' + last_ip_oct[last_ip_oct | length - 1] %} +{% endif %} +{% if loop.last and pool_config.next_pool is vyos_defined %} {{ iprange_str }},name={{ pool_name }},next={{ pool_config.next_pool }} -{% else %} +{% else %} {{ iprange_str }},name={{ pool_name }} +{% endif %} +{% endfor %} {% endif %} {% endfor %} {% endfor %} |