From ff2e8d333d659567132660d8a09094acf07eb8d3 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 8 Mar 2020 17:34:44 +0100 Subject: wireless: radius: T2110: aupport server disable option --- src/conf_mode/interfaces-wireless.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/conf_mode/interfaces-wireless.py') diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py index 3d4da10da..0c6500578 100755 --- a/src/conf_mode/interfaces-wireless.py +++ b/src/conf_mode/interfaces-wireless.py @@ -643,6 +643,7 @@ radius_client_addr={{ sec_wpa_radius_source }} {% endif %} {% for radius in sec_wpa_radius -%} +{%- if not radius.disabled -%} # RADIUS authentication server auth_server_addr={{ radius.server }} auth_server_port={{ radius.port }} @@ -653,6 +654,7 @@ acct_server_addr={{ radius.server }} acct_server_port={{ radius.acc_port }} acct_server_shared_secret={{ radius.key }} {% endif %} +{% endif %} {% endfor %} {% endif %} @@ -1211,6 +1213,7 @@ def get_config(): radius = { 'server' : server, 'acc_port' : '', + 'disabled': False, 'port' : 1812, 'key' : '' } @@ -1223,6 +1226,10 @@ def get_config(): if conf.exists('accounting'): radius['acc_port'] = radius['port'] + 1 + # Check if RADIUS server was temporary disabled + if conf.exists(['disable']): + radius['disabled'] = True + # RADIUS server shared-secret if conf.exists('key'): radius['key'] = conf.return_value('key') -- cgit v1.2.3