diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-18 12:20:11 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-18 13:25:08 +0200 |
commit | cda566dfde944f705244f0b9a9293d1a47c55a50 (patch) | |
tree | 318046bb5e10c07a12df4ae3f1c459afe7f4d36b /src/conf_mode/service_pppoe-server.py | |
parent | abcd7026efd8cbeb1c4db828788eda9a6dd2be41 (diff) | |
download | vyos-1x-cda566dfde944f705244f0b9a9293d1a47c55a50.tar.gz vyos-1x-cda566dfde944f705244f0b9a9293d1a47c55a50.zip |
pppoe-server: T2314: migrate RADIUS configuration to common CLI syntax
Diffstat (limited to 'src/conf_mode/service_pppoe-server.py')
-rwxr-xr-x | src/conf_mode/service_pppoe-server.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/conf_mode/service_pppoe-server.py b/src/conf_mode/service_pppoe-server.py index 238208eff..52be86b14 100755 --- a/src/conf_mode/service_pppoe-server.py +++ b/src/conf_mode/service_pppoe-server.py @@ -71,6 +71,7 @@ default_config_data = { 'radius_timeout': '3', 'radius_nas_id': '', 'radius_nas_ip': '', + 'radius_source_address': '', 'radius_shaper_attr': '', 'radius_shaper_vendor': '', 'radius_dynamic_author': '', @@ -198,7 +199,7 @@ def get_config(): # authentication mode radius servers and settings if conf.exists(['authentication', 'mode', 'radius']): - for server in conf.list_nodes(['authentication', 'radius-server']): + for server in conf.list_nodes(['authentication', 'radius', 'server']): radius = { 'server' : server, 'key' : '', @@ -214,15 +215,15 @@ def get_config(): if conf.exists(['port']): radius['port'] = conf.return_value(['port']) - if conf.exists(['secret']): - radius['key'] = conf.return_value(['secret']) + if conf.exists(['key']): + radius['key'] = conf.return_value(['key']) if not conf.exists(['disable']): pppoe['radius_server'].append(radius) # # advanced radius-setting - conf.set_level(base_path + ['authentication', 'radius-settings']) + conf.set_level(base_path + ['authentication', 'radius']) if conf.exists(['acct-timeout']): pppoe['radius_acct_tmo'] = conf.return_value(['acct-timeout']) @@ -239,6 +240,9 @@ def get_config(): if conf.exists(['nas-ip-address']): pppoe['radius_nas_ip'] = conf.return_value(['nas-ip-address']) + if conf.exists(['source-address']): + pppoe['radius_source_address'] = conf.return_value(['source-address']) + # Dynamic Authorization Extensions (DOA)/Change Of Authentication (COA) if conf.exists(['dynamic-author']): dae = { |