Development
This commit is contained in:
parent
351ce39558
commit
3b2f645254
4 changed files with 34 additions and 30 deletions
|
|
@ -71,7 +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
|
||||
mab_first = 'mab_first' in request.form
|
||||
inner_protocol = request.form.get('inner_protocol', '')
|
||||
|
||||
_valid_inner = {
|
||||
|
|
@ -85,7 +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
|
||||
after['mab_first'] = mab_first
|
||||
if eap_protocol in _valid_inner and inner_protocol in _valid_inner[eap_protocol]:
|
||||
after['inner_protocol'] = inner_protocol
|
||||
else:
|
||||
|
|
@ -96,7 +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['mab_first'] = mab_first
|
||||
after.pop('eap_protocol', None)
|
||||
after.pop('tunneled_reply', None)
|
||||
after.pop('inner_protocol', None)
|
||||
|
|
@ -105,7 +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)
|
||||
after.pop('mab_first', None)
|
||||
cfg.setdefault('radius', {})['options'] = after
|
||||
|
||||
changes = config_utils.diff_fields(before, after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue