Development
This commit is contained in:
parent
cef2543572
commit
351ce39558
3 changed files with 120 additions and 104 deletions
|
|
@ -71,6 +71,7 @@ def auth_mode_save():
|
|||
eap_protocol = 'eap_peap'
|
||||
tunneled_reply = 'tunneled_reply' in request.form
|
||||
include_length = 'include_length' in request.form
|
||||
mab_fallback = 'mab_fallback' in request.form
|
||||
inner_protocol = request.form.get('inner_protocol', '')
|
||||
|
||||
_valid_inner = {
|
||||
|
|
@ -84,6 +85,7 @@ def auth_mode_save():
|
|||
if auth_mode == 'eap_password':
|
||||
after['eap_protocol'] = eap_protocol
|
||||
after['tunneled_reply'] = tunneled_reply and eap_protocol in ('eap_peap', 'eap_ttls')
|
||||
after['mab_fallback'] = mab_fallback
|
||||
if eap_protocol in _valid_inner and inner_protocol in _valid_inner[eap_protocol]:
|
||||
after['inner_protocol'] = inner_protocol
|
||||
else:
|
||||
|
|
@ -94,6 +96,7 @@ def auth_mode_save():
|
|||
after.pop('include_length', None)
|
||||
elif auth_mode == 'eap_credential':
|
||||
after['include_length'] = include_length
|
||||
after['mab_fallback'] = mab_fallback
|
||||
after.pop('eap_protocol', None)
|
||||
after.pop('tunneled_reply', None)
|
||||
after.pop('inner_protocol', None)
|
||||
|
|
@ -102,6 +105,7 @@ def auth_mode_save():
|
|||
after.pop('tunneled_reply', None)
|
||||
after.pop('inner_protocol', None)
|
||||
after.pop('include_length', None)
|
||||
after.pop('mab_fallback', None)
|
||||
cfg.setdefault('radius', {})['options'] = after
|
||||
|
||||
changes = config_utils.diff_fields(before, after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue