summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_pppoe-server.py12
-rwxr-xr-xsrc/migration-scripts/pppoe-server/2-to-37
2 files changed, 15 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 = {
diff --git a/src/migration-scripts/pppoe-server/2-to-3 b/src/migration-scripts/pppoe-server/2-to-3
index c85ada904..977f1ef43 100755
--- a/src/migration-scripts/pppoe-server/2-to-3
+++ b/src/migration-scripts/pppoe-server/2-to-3
@@ -68,6 +68,13 @@ else:
config.delete(wins_base)
+ # Remove RADIUS server req-limit node
+ radius_base = base + ['authentication', 'radius']
+ if config.exists(radius_base):
+ for server in config.list_nodes(radius_base + ['server']):
+ if config.exists(radius_base + ['server', server, 'req-limit']):
+ config.delete(radius_base + ['server', server, 'req-limit'])
+
try:
with open(file_name, 'w') as f:
f.write(config.to_string())