Development

This commit is contained in:
Matthew Grotke 2026-06-06 01:39:55 -04:00
parent dc2be3e5aa
commit c5953be868
3 changed files with 5 additions and 15 deletions

View file

@ -88,10 +88,7 @@ def auth_mode_save():
after['inner_protocol'] = inner_protocol after['inner_protocol'] = inner_protocol
else: else:
after.pop('inner_protocol', None) after.pop('inner_protocol', None)
if eap_protocol == 'eap_ttls': after['include_length'] = include_length
after['include_length'] = include_length
else:
after.pop('include_length', None)
else: else:
after.pop('eap_protocol', None) after.pop('eap_protocol', None)
after.pop('tunneled_reply', None) after.pop('tunneled_reply', None)

View file

@ -268,14 +268,6 @@
"value": "%RADIUS_TUNNELED_REPLY%", "value": "%RADIUS_TUNNELED_REPLY%",
"hint": "Copies VLAN and authorization attributes from the inner EAP exchange to the outer RADIUS Access-Accept. Required by some switches for VLAN assignment to work correctly." "hint": "Copies VLAN and authorization attributes from the inner EAP exchange to the outer RADIUS Access-Accept. Required by some switches for VLAN assignment to work correctly."
}, },
{
"type": "raw_html",
"html": "</div>"
},
{
"type": "raw_html",
"html": "<div id=\"eap-ttls-row\">"
},
{ {
"type": "field", "type": "field",
"label": "", "label": "",

View file

@ -295,9 +295,10 @@ def set_freeradius_eap(data):
inner_block = 'peap' if eap_protocol == 'eap_peap' else 'ttls' inner_block = 'peap' if eap_protocol == 'eap_peap' else 'ttls'
content4 = _patch_setting_in_block(content4, inner_block, 'default_eap_type', inner_protocol) content4 = _patch_setting_in_block(content4, inner_block, 'default_eap_type', inner_protocol)
if eap_protocol == 'eap_ttls': if eap_protocol in ('eap_peap', 'eap_ttls'):
il_val = 'yes' if opts.get('include_length', False) else 'no' il_val = 'yes' if opts.get('include_length', False) else 'no'
content4 = _patch_setting_in_block(content4, 'ttls', 'include_length', il_val) inner_blk = 'peap' if eap_protocol == 'eap_peap' else 'ttls'
content4 = _patch_setting_in_block(content4, inner_blk, 'include_length', il_val)
if content4 == content: if content4 == content:
return False return False