Development
This commit is contained in:
parent
a94863e25a
commit
dc2be3e5aa
4 changed files with 29 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ def auth_mode_save():
|
|||
if eap_protocol not in ('eap_peap', 'eap_ttls', 'eap_md5'):
|
||||
eap_protocol = 'eap_peap'
|
||||
tunneled_reply = 'tunneled_reply' in request.form
|
||||
include_length = 'include_length' in request.form
|
||||
inner_protocol = request.form.get('inner_protocol', '')
|
||||
|
||||
_valid_inner = {
|
||||
|
|
@ -87,10 +88,15 @@ def auth_mode_save():
|
|||
after['inner_protocol'] = inner_protocol
|
||||
else:
|
||||
after.pop('inner_protocol', None)
|
||||
if eap_protocol == 'eap_ttls':
|
||||
after['include_length'] = include_length
|
||||
else:
|
||||
after.pop('include_length', None)
|
||||
else:
|
||||
after.pop('eap_protocol', None)
|
||||
after.pop('tunneled_reply', None)
|
||||
after.pop('inner_protocol', None)
|
||||
after.pop('include_length', None)
|
||||
cfg.setdefault('radius', {})['options'] = after
|
||||
|
||||
changes = diff_fields(before, after)
|
||||
|
|
|
|||
|
|
@ -272,6 +272,23 @@
|
|||
"type": "raw_html",
|
||||
"html": "</div>"
|
||||
},
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "<div id=\"eap-ttls-row\">"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"label": "",
|
||||
"name": "include_length",
|
||||
"input_type": "checkbox",
|
||||
"checkbox_label": "Include Length",
|
||||
"value": "%RADIUS_INCLUDE_LENGTH%",
|
||||
"hint": "Include the total length of message in every packet."
|
||||
},
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "</div>"
|
||||
},
|
||||
{
|
||||
"type": "raw_html",
|
||||
"html": "</div>"
|
||||
|
|
|
|||
|
|
@ -119,7 +119,8 @@ def collect_tokens(cfg):
|
|||
tokens['RADIUS_LOGGING_HINT'] = 'Unchecking will clear logs.' if fr_gen.get('logging', False) else ''
|
||||
tokens['RADIUS_GEN_LOG_MAX_KB'] = str(fr_gen.get('log_max_kb', 1024))
|
||||
|
||||
tokens['RADIUS_TUNNELED_REPLY'] = 'true' if fr_opts.get('tunneled_reply', False) else ''
|
||||
tokens['RADIUS_TUNNELED_REPLY'] = 'true' if fr_opts.get('tunneled_reply', False) else ''
|
||||
tokens['RADIUS_INCLUDE_LENGTH'] = 'true' if fr_opts.get('include_length', False) else ''
|
||||
|
||||
vlans = cfg.get('vlans', [])
|
||||
default_vlan = next((v['name'] for v in vlans if v.get('radius_default') is True), '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue