summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-27 15:22:56 +0100
committerGitHub <noreply@github.com>2023-12-27 15:22:56 +0100
commit957c99f20f9c08b0fc5dd51664a06cae16bc52c1 (patch)
treeb9d1beed0c481efb11d38c8f2a3a6aded7842733 /data/templates
parent7324edfeb7ededc888a23bf72562673da2797f16 (diff)
parent714a6b1dd5e4de6c85911fa64f4b5f37b44979cf (diff)
downloadvyos-1x-957c99f20f9c08b0fc5dd51664a06cae16bc52c1.tar.gz
vyos-1x-957c99f20f9c08b0fc5dd51664a06cae16bc52c1.zip
Merge pull request #2693 from aapostoliuk/T5859-circinus
T5859: Fixed format of pool range in the accel-ppp config
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/accel-ppp/config_ip_pool.j210
1 files changed, 8 insertions, 2 deletions
diff --git a/data/templates/accel-ppp/config_ip_pool.j2 b/data/templates/accel-ppp/config_ip_pool.j2
index c567236a4..6ac04e1a1 100644
--- a/data/templates/accel-ppp/config_ip_pool.j2
+++ b/data/templates/accel-ppp/config_ip_pool.j2
@@ -12,10 +12,16 @@ 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 %}
-{{ pool_config.range }},name={{ pool_name }},next={{ pool_config.next_pool }}
+{{ iprange_str }},name={{ pool_name }},next={{ pool_config.next_pool }}
{% else %}
-{{ pool_config.range }},name={{ pool_name }}
+{{ iprange_str }},name={{ pool_name }}
{% endif %}
{% endfor %}
{% endfor %}