summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhagbard-01 <39653662+hagbard-01@users.noreply.github.com>2019-09-12 13:30:33 -0700
committerGitHub <noreply@github.com>2019-09-12 13:30:33 -0700
commit5d432809cb44c49c5164f06f8795e9f7ed87854f (patch)
treeb1af21c5df377868128ddfe1a231aff7a4de3b27 /src
parent44227cfaa63446174d1305c2143cf676a576b759 (diff)
parentb09fc4dbb2a0dce2d31245fb9b4777aa29bbd356 (diff)
downloadvyos-1x-5d432809cb44c49c5164f06f8795e9f7ed87854f.tar.gz
vyos-1x-5d432809cb44c49c5164f06f8795e9f7ed87854f.zip
Merge pull request #127 from DmitriyEshenko/l2tp-op_mode
[l2tp] T834 Implementation advanced ppp-options/lcp.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/accel_l2tp.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/conf_mode/accel_l2tp.py b/src/conf_mode/accel_l2tp.py
index fc60a8cd7..244a720db 100755
--- a/src/conf_mode/accel_l2tp.py
+++ b/src/conf_mode/accel_l2tp.py
@@ -134,7 +134,16 @@ single-session=replace
{% if idle_timeout %}
lcp-echo-timeout={{idle_timeout}}
{% endif %}
+{% if ppp_options['lcp-echo-interval'] %}
+lcp-echo-interval={{ppp_options['lcp-echo-interval']}}
+{% else %}
lcp-echo-interval=30
+{% endif %}
+{% if ppp_options['lcp-echo-failure'] %}
+lcp-echo-failure={{ppp_options['lcp-echo-failure']}}
+{% else %}
+lcp-echo-failure=3
+{% endif %}
{% if ccp_disable %}
ccp=0
{% endif %}
@@ -288,6 +297,7 @@ def get_config():
'mtu' : '1436',
'ip6_column' : '',
'ip6_dp_column' : '',
+ 'ppp_options' : {},
}
### general options ###
@@ -440,6 +450,17 @@ def get_config():
if c.exists('ccp-disable'):
config_data['ccp_disable'] = True
+ ### ppp_options
+ ppp_options = {}
+ if c.exists('ppp-options'):
+ if c.exists('ppp-options lcp-echo-failure'):
+ ppp_options['lcp-echo-failure'] = c.return_value('ppp-options lcp-echo-failure')
+ if c.exists('ppp-options lcp-echo-interval'):
+ ppp_options['lcp-echo-interval'] = c.return_value('ppp-options lcp-echo-interval')
+
+ if len(ppp_options) !=0:
+ config_data['ppp_options'] = ppp_options
+
return config_data
def verify(c):