summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_l2tp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/vpn_l2tp.py')
-rwxr-xr-xsrc/conf_mode/vpn_l2tp.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py
index da51b0d06..80eb8daf2 100755
--- a/src/conf_mode/vpn_l2tp.py
+++ b/src/conf_mode/vpn_l2tp.py
@@ -25,10 +25,10 @@ from time import sleep
from ipaddress import ip_network
from vyos.config import Config
+from vyos.template import is_ipv4
+from vyos.template import render
from vyos.util import call, get_half_cpus
-from vyos.validate import is_ipv4
from vyos import ConfigError
-from vyos.template import render
from vyos import airbag
airbag.enable()
@@ -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']):
@@ -161,6 +162,9 @@ def get_config(config=None):
conf.set_level(base_path + ['authentication', 'radius', 'server', server])
+ if conf.exists(['disable-accounting']):
+ radius['acct_port'] = '0'
+
if conf.exists(['fail-time']):
radius['fail_time'] = conf.return_value(['fail-time'])