From 2295961ee36475082bef76dc84aa35226a87593c Mon Sep 17 00:00:00 2001 From: sever-sever Date: Sat, 26 Sep 2020 14:00:33 +0000 Subject: accel-ppp: T2918: Add accounting interim jitter option --- src/conf_mode/service_ipoe-server.py | 5 +++++ src/conf_mode/service_pppoe-server.py | 4 ++++ src/conf_mode/vpn_l2tp.py | 4 ++++ src/conf_mode/vpn_pptp.py | 4 ++++ 4 files changed, 17 insertions(+) (limited to 'src') diff --git a/src/conf_mode/service_ipoe-server.py b/src/conf_mode/service_ipoe-server.py index 96cf932d1..87c7754f3 100755 --- a/src/conf_mode/service_ipoe-server.py +++ b/src/conf_mode/service_ipoe-server.py @@ -43,6 +43,7 @@ default_config_data = { 'client_ipv6_pool': [], 'client_ipv6_delegate_prefix': [], 'radius_server': [], + 'radius_acct_inter_jitter': '', 'radius_acct_tmo': '3', 'radius_max_try': '3', 'radius_timeout': '3', @@ -174,6 +175,10 @@ def get_config(config=None): # # advanced radius-setting conf.set_level(base_path + ['authentication', 'radius']) + + if conf.exists(['acct-interim-jitter']): + ipoe['radius_acct_inter_jitter'] = conf.return_value(['acct-interim-jitter']) + if conf.exists(['acct-timeout']): ipoe['radius_acct_tmo'] = conf.return_value(['acct-timeout']) diff --git a/src/conf_mode/service_pppoe-server.py b/src/conf_mode/service_pppoe-server.py index de15ca879..a4e937b1a 100755 --- a/src/conf_mode/service_pppoe-server.py +++ b/src/conf_mode/service_pppoe-server.py @@ -72,6 +72,7 @@ default_config_data = { 'ppp_preallocate_vif': False, 'radius_server': [], + 'radius_acct_inter_jitter': '', 'radius_acct_tmo': '3', 'radius_max_try': '3', 'radius_timeout': '3', @@ -271,6 +272,9 @@ def get_config(config=None): # advanced radius-setting conf.set_level(base_path + ['authentication', 'radius']) + if conf.exists(['acct-interim-jitter']): + pppoe['radius_acct_inter_jitter'] = conf.return_value(['acct-interim-jitter']) + if conf.exists(['acct-timeout']): pppoe['radius_acct_tmo'] = conf.return_value(['acct-timeout']) diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py index 13831dcd8..da51b0d06 100755 --- a/src/conf_mode/vpn_l2tp.py +++ b/src/conf_mode/vpn_l2tp.py @@ -56,6 +56,7 @@ default_config_data = { 'ppp_echo_interval' : '30', 'ppp_echo_timeout': '0', 'radius_server': [], + 'radius_acct_inter_jitter': '', 'radius_acct_tmo': '3', 'radius_max_try': '3', 'radius_timeout': '3', @@ -179,6 +180,9 @@ def get_config(config=None): # advanced radius-setting conf.set_level(base_path + ['authentication', 'radius']) + if conf.exists(['acct-interim-jitter']): + l2tp['radius_acct_inter_jitter'] = conf.return_value(['acct-interim-jitter']) + if conf.exists(['acct-timeout']): l2tp['radius_acct_tmo'] = conf.return_value(['acct-timeout']) diff --git a/src/conf_mode/vpn_pptp.py b/src/conf_mode/vpn_pptp.py index 9f3b40534..306d05c60 100755 --- a/src/conf_mode/vpn_pptp.py +++ b/src/conf_mode/vpn_pptp.py @@ -36,6 +36,7 @@ default_pptp = { 'auth_mode' : 'local', 'local_users' : [], 'radius_server' : [], + 'radius_acct_inter_jitter': '', 'radius_acct_tmo' : '30', 'radius_max_try' : '3', 'radius_timeout' : '30', @@ -139,6 +140,9 @@ def get_config(config=None): # advanced radius-setting conf.set_level(base_path + ['authentication', 'radius']) + if conf.exists(['acct-interim-jitter']): + pptp['radius_acct_inter_jitter'] = conf.return_value(['acct-interim-jitter']) + if conf.exists(['acct-timeout']): pptp['radius_acct_tmo'] = conf.return_value(['acct-timeout']) -- cgit v1.2.3