summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-08-18 15:18:33 +0100
committerGitHub <noreply@github.com>2022-08-18 15:18:33 +0100
commitdc0e468046bef4aef3ee81eec23c3703e0b5da85 (patch)
tree375ae6f0a735436bd58643f6d1d74eeca88e7c21 /src
parent4d845cc368220b509faa91e61260eab1b4c38517 (diff)
parent28936477c4f4c4633c9a384054c0a65090ece101 (diff)
downloadvyos-1x-dc0e468046bef4aef3ee81eec23c3703e0b5da85.tar.gz
vyos-1x-dc0e468046bef4aef3ee81eec23c3703e0b5da85.zip
Merge pull request #1470 from c-po/openconnect-T4614
ocserv: openconnect: T4614: add support for split-dns (equuleus)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpn_openconnect.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/vpn_openconnect.py b/src/conf_mode/vpn_openconnect.py
index 00b96884b..f24d5b618 100755
--- a/src/conf_mode/vpn_openconnect.py
+++ b/src/conf_mode/vpn_openconnect.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2018-2020 VyOS maintainers and contributors
+# Copyright (C) 2018-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -61,8 +61,8 @@ def verify(ocserv):
if "authentication" in ocserv:
if "mode" in ocserv["authentication"]:
if "local" in ocserv["authentication"]["mode"]:
- if not ocserv["authentication"]["local_users"] or not ocserv["authentication"]["local_users"]["username"]:
- raise ConfigError('openconnect mode local required at leat one user')
+ if 'local_users' not in ocserv["authentication"] or 'username' not in ocserv["authentication"]["local_users"]:
+ raise ConfigError('openconnect mode local requires at leat one user')
else:
for user in ocserv["authentication"]["local_users"]["username"]:
if not "password" in ocserv["authentication"]["local_users"]["username"][user]: