summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-20 05:51:39 +0200
committerGitHub <noreply@github.com>2020-08-20 05:51:39 +0200
commit106073a1899fcc781a929438df40b5b29433eb3d (patch)
treed09689f2c8e8263072c0b5456e1788c49338ea4f /src
parentc7707363bd9b44f9dd9bf460247f350a05b3f5fb (diff)
parent9627888b89ddb712eec06a19bcc149367e8c3036 (diff)
downloadvyos-1x-106073a1899fcc781a929438df40b5b29433eb3d.tar.gz
vyos-1x-106073a1899fcc781a929438df40b5b29433eb3d.zip
Merge pull request #530 from DmitriyEshenko/1x-anyconnect-fix01
anyconnect: T2811: Return None if anyconnect not configured
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpn_anyconnect.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/vpn_anyconnect.py b/src/conf_mode/vpn_anyconnect.py
index 45c06bffa..158e1a117 100755
--- a/src/conf_mode/vpn_anyconnect.py
+++ b/src/conf_mode/vpn_anyconnect.py
@@ -43,6 +43,9 @@ def get_hash(password):
def get_config():
conf = Config()
base = ['vpn', 'anyconnect']
+ if not conf.exists(base):
+ return None
+
ocserv = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)
default_values = defaults(base)
ocserv = dict_merge(default_values, ocserv)