diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-08-19 10:16:00 +0000 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-08-19 10:16:00 +0000 |
commit | 9627888b89ddb712eec06a19bcc149367e8c3036 (patch) | |
tree | fd70a3f82f92c8ca5cde5c62d3bd18200e99c78c /src | |
parent | 01609e08e3bf1a5497c0ef9bce8e55ab2a1212a3 (diff) | |
download | vyos-1x-9627888b89ddb712eec06a19bcc149367e8c3036.tar.gz vyos-1x-9627888b89ddb712eec06a19bcc149367e8c3036.zip |
anyconnect: T2811: Return None if anyconnect not configured
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/vpn_anyconnect.py | 3 |
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) |