summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-05 12:22:53 +0000
committerGitHub <noreply@github.com>2022-12-05 12:22:53 +0000
commitec6aaf72378d02753ca38ff17adadf785b2b21bd (patch)
tree390f7b039c01fd7db1d1ea2bd23acd801d79f140
parent26723840edb0eea95f4d31fa228f165bfe5f4292 (diff)
parent7ce6ad4486912dc76c5999f420897efe2747cabb (diff)
downloadvyos-1x-ec6aaf72378d02753ca38ff17adadf785b2b21bd.tar.gz
vyos-1x-ec6aaf72378d02753ca38ff17adadf785b2b21bd.zip
Merge pull request #1693 from sever-sever/T4860
T4860: Verify if mode in openconnect ocserv dict
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 7c86356e9..b336b0c03 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -58,7 +58,7 @@ def get_config():
default_values = defaults(base)
ocserv = dict_merge(default_values, ocserv)
- if "local" in ocserv["authentication"]["mode"]:
+ if 'mode' in ocserv["authentication"] and "local" in ocserv["authentication"]["mode"]:
# workaround a "know limitation" - https://phabricator.vyos.net/T2665
del ocserv['authentication']['local_users']['username']['otp']
if not ocserv["authentication"]["local_users"]["username"]: