summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-11-03 19:55:23 +0100
committerChristian Poessinger <christian@poessinger.com>2021-11-03 19:57:48 +0100
commit8ec9a2dc7c149a7565e4e9823a8ccfc3bba3bce4 (patch)
tree93218c39bfe3e525446bb1cb881fff18e5dbd235 /python/vyos
parent2ed561e249e7f44d1269879bcf55cb83aee2324a (diff)
downloadvyos-1x-8ec9a2dc7c149a7565e4e9823a8ccfc3bba3bce4.tar.gz
vyos-1x-8ec9a2dc7c149a7565e4e9823a8ccfc3bba3bce4.zip
sstp: T2566: use XML defaultValue over Jinja2 hardcoded value
(cherry picked from commit 01ed77040ec9493e4ca1cf868ff3c22847da4487)
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configdict.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 8308f0e9b..afdd62a73 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -532,6 +532,11 @@ def get_accel_dict(config, base, chap_secrets):
if dict_search('authentication.local_users.username', default_values):
del default_values['authentication']['local_users']['username']
+ # T2665: defaults include IPv6 client-pool mask per TAG node which need to be
+ # added to individual local users instead - so we can simply delete them
+ if dict_search('client_ipv6_pool.prefix.mask', default_values):
+ del default_values['client_ipv6_pool']['prefix']['mask']
+
dict = dict_merge(default_values, dict)
# set CPUs cores to process requests
@@ -575,4 +580,13 @@ def get_accel_dict(config, base, chap_secrets):
dict['authentication']['local_users']['username'][username] = dict_merge(
default_values, dict['authentication']['local_users']['username'][username])
+ # Add individual IPv6 client-pool default mask if required
+ if dict_search('client_ipv6_pool.prefix', dict):
+ # T2665
+ default_values = defaults(base + ['client-ipv6-pool', 'prefix'])
+
+ for prefix in dict_search('client_ipv6_pool.prefix', dict):
+ dict['client_ipv6_pool']['prefix'][prefix] = dict_merge(
+ default_values, dict['client_ipv6_pool']['prefix'][prefix])
+
return dict