From 2343f4bfa0f24c49d8c28b287dc9dd0c601141ff Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 24 Oct 2020 17:19:17 +0200 Subject: vpn: l2tp: T3009: fix non effective "authentication require" option The CLI node was read in incorrect (wrong path). In addtition the list was not reset to [] when authentication was specified on the CLI. --- src/conf_mode/vpn_l2tp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py index da51b0d06..48d887abe 100755 --- a/src/conf_mode/vpn_l2tp.py +++ b/src/conf_mode/vpn_l2tp.py @@ -100,7 +100,8 @@ def get_config(config=None): if conf.exists(['authentication', 'mode']): l2tp['auth_mode'] = conf.return_value(['authentication', 'mode']) - if conf.exists(['authentication', 'protocols']): + if conf.exists(['authentication', 'require']): + l2tp['auth_proto'] = [] auth_mods = { 'pap': 'auth_pap', 'chap': 'auth_chap_md5', @@ -108,7 +109,7 @@ def get_config(config=None): 'mschap-v2': 'auth_mschap_v2' } - for proto in conf.return_values(['authentication', 'protocols']): + for proto in conf.return_values(['authentication', 'require']): l2tp['auth_proto'].append(auth_mods[proto]) if conf.exists(['authentication', 'mppe']): -- cgit v1.2.3