summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-22 10:12:12 +0100
committerGitHub <noreply@github.com>2023-02-22 10:12:12 +0100
commit4f0ccab4b0b0c8bb2cdce321c6dce39bf4215ce9 (patch)
tree3556052d239767e94093f20e44b8decc7d59f924
parent8dc1eece67124678abe21aef9c6392bc2cd78612 (diff)
parent806273bff6a60335a30cb203ca9e4319a31e6020 (diff)
downloadvyos-1x-4f0ccab4b0b0c8bb2cdce321c6dce39bf4215ce9.tar.gz
vyos-1x-4f0ccab4b0b0c8bb2cdce321c6dce39bf4215ce9.zip
Merge pull request #1840 from sarthurdev/T5023
openconnect: T5023: Conf script missing optional config parameter
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 855eb99f9..bf5d3ac84 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -105,8 +105,11 @@ def T2665_default_dict_cleanup(origin: dict, default_values: dict) -> dict:
return origin
-def get_config():
- conf = Config()
+def get_config(config=None):
+ if config:
+ conf = config
+ else:
+ conf = Config()
base = ['vpn', 'openconnect']
if not conf.exists(base):
return None