summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-17 18:53:34 +0200
committerGitHub <noreply@github.com>2020-06-17 18:53:34 +0200
commit99bdbf7859577c4cd942859ecfdd670e83f33cf3 (patch)
tree4530e39d8c28a3927e548851b855aa52cdd1a692 /src/conf_mode
parent883426259651f400fda05446f8ecef5697cbcd60 (diff)
parente932d80b7b97ecb586c1d1be7750277c84ea65d1 (diff)
downloadvyos-1x-99bdbf7859577c4cd942859ecfdd670e83f33cf3.tar.gz
vyos-1x-99bdbf7859577c4cd942859ecfdd670e83f33cf3.zip
Merge pull request #462 from DmitriyEshenko/cur-1x-17062020
login: radius: T2299: Implement RADIUS servers priority
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/system-login.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py
index 5990c3777..93d4cc679 100755
--- a/src/conf_mode/system-login.py
+++ b/src/conf_mode/system-login.py
@@ -144,7 +144,8 @@ def get_config():
'disabled': False,
'key': '',
'port': '1812',
- 'timeout': '2'
+ 'timeout': '2',
+ 'priority': 255
}
conf.set_level(base_level + ['radius', 'server', server])
@@ -164,6 +165,10 @@ def get_config():
if conf.exists(['timeout']):
server_cfg['timeout'] = conf.return_value(['timeout'])
+ # Check if RADIUS server has priority
+ if conf.exists(['priority']):
+ server_cfg['priority'] = int(conf.return_value(['priority']))
+
# Append individual RADIUS server configuration to global server list
login['radius_server'].append(server_cfg)