diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-12-02 11:58:25 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-12-04 13:01:45 +0000 |
commit | c229abf2a7db93e0117d6b39de62b9c15150c915 (patch) | |
tree | 1fa25ad4798871dbb12ee78033246aaf044c3f0b /python/vyos | |
parent | e96e629fab3936c894214bef44155cb1bc671e4c (diff) | |
download | vyos-1x-c229abf2a7db93e0117d6b39de62b9c15150c915.tar.gz vyos-1x-c229abf2a7db93e0117d6b39de62b9c15150c915.zip |
T4804: Fix check for PPPoE server local-users
We check if local_users is None
Check also and empty dict
{'access_concentrator': 'vyos-ac',
'authentication': {'local_users': {},
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configverify.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index afa0c5b33..8e0ce701e 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -388,8 +388,10 @@ def verify_accel_ppp_base_service(config, local_users=True): """ # vertify auth settings if local_users and dict_search('authentication.mode', config) == 'local': - if dict_search(f'authentication.local_users', config) == None: - raise ConfigError('Authentication mode local requires local users to be configured!') + if (dict_search(f'authentication.local_users', config) is None or + dict_search(f'authentication.local_users', config) == {}): + raise ConfigError( + 'Authentication mode local requires local users to be configured!') for user in dict_search('authentication.local_users.username', config): user_config = config['authentication']['local_users']['username'][user] |