summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-10-24 17:19:17 +0200
committerChristian Poessinger <christian@poessinger.com>2020-10-24 17:19:17 +0200
commit2343f4bfa0f24c49d8c28b287dc9dd0c601141ff (patch)
treec9ed0b6bba2a0155407e70b46513c53d8d591610
parent9939139ba4ad18dc4b62a827d8ab7b74d0c28124 (diff)
downloadvyos-1x-2343f4bfa0f24c49d8c28b287dc9dd0c601141ff.tar.gz
vyos-1x-2343f4bfa0f24c49d8c28b287dc9dd0c601141ff.zip
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.
-rwxr-xr-xsrc/conf_mode/vpn_l2tp.py5
1 files changed, 3 insertions, 2 deletions
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']):