summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-15 19:02:55 +0100
committerGitHub <noreply@github.com>2023-02-15 19:02:55 +0100
commitc4d26a3aaca68d0014ce65d97184f7ce6258d6df (patch)
tree90ae097906e1e6d3a0eb3362acff6dcf8d1251ea /python
parentd530c0363df192bd02ab21f329b42e6c9ecd7274 (diff)
parent21e3a0b0258f690b10a9144f1c28962d642578f7 (diff)
downloadvyos-1x-c4d26a3aaca68d0014ce65d97184f7ce6258d6df.tar.gz
vyos-1x-c4d26a3aaca68d0014ce65d97184f7ce6258d6df.zip
Merge pull request #1822 from sever-sever/T4971
T4971: Accel-ppp verify if client_ip_pool key exists in config
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configverify.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 30bdd2d47..fcc8cc733 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -420,11 +420,12 @@ def verify_accel_ppp_base_service(config, local_users=True):
if 'gateway_address' in config:
gateway = True
else:
- if dict_search_recursive(config, 'gateway_address', ['client_ip_pool', 'name']):
- for _, v in config['client_ip_pool']['name'].items():
- if 'gateway_address' in v:
- gateway = True
- break
+ if 'client_ip_pool' in config:
+ if dict_search_recursive(config, 'gateway_address', ['client_ip_pool', 'name']):
+ for _, v in config['client_ip_pool']['name'].items():
+ if 'gateway_address' in v:
+ gateway = True
+ break
if not gateway:
raise ConfigError('Server requires gateway-address to be configured!')