luci-mod-network: wireless: RADIUS Access/Accounting-Request attrs
See following for more detail: https://w1.fi/cgit/hostap/commit/?id=af35e7af7f8bb1ca9f0905b4074fb56a264aa12b Signed-off-by: Paul Donald <newtwen@gmail.com>
This commit is contained in:
parent
29772a6997
commit
d9e7be1b43
1 changed files with 29 additions and 0 deletions
|
@ -1434,6 +1434,34 @@ return view.extend({
|
||||||
o.password = true;
|
o.password = true;
|
||||||
|
|
||||||
/* extra RADIUS settings start */
|
/* extra RADIUS settings start */
|
||||||
|
var attr_validate = function(section_id, value) {
|
||||||
|
if (!value)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!/^[0-9]+(:s:.+|:d:[0-9]+|:x:([0-9a-zA-Z]{2})+)?$/.test(value) )
|
||||||
|
return _('Must be in %s format.').format('<attr_id>[:<syntax:value>]');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var req_attr_syntax = _('Format:') + '<code><attr_id>[:<syntax:value>]</code>' + '<br />' +
|
||||||
|
'<code>syntax: s = %s; '.format(_('string (UTF-8)')) + 'd = %s; '.format(_('integer')) + 'x = %s</code>'.format(_('octet string'))
|
||||||
|
|
||||||
|
/* https://w1.fi/cgit/hostap/commit/?id=af35e7af7f8bb1ca9f0905b4074fb56a264aa12b */
|
||||||
|
o = ss.taboption('encryption', form.DynamicList, 'radius_auth_req_attr', _('RADIUS Access-Request attributes'),
|
||||||
|
_('Attributes to add/replace in each request.') + '<br />' + req_attr_syntax );
|
||||||
|
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
||||||
|
o.rmempty = true;
|
||||||
|
o.validate = attr_validate;
|
||||||
|
o.placeholder = '126:s:Operator';
|
||||||
|
|
||||||
|
o = ss.taboption('encryption', form.DynamicList, 'radius_acct_req_attr', _('RADIUS Accounting-Request attributes'),
|
||||||
|
_('Attributes to add/replace in each request.') + '<br />' + req_attr_syntax );
|
||||||
|
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
||||||
|
o.rmempty = true;
|
||||||
|
o.validate = attr_validate;
|
||||||
|
o.placeholder = '77:x:74657374696e67';
|
||||||
|
|
||||||
o = ss.taboption('encryption', form.ListValue, 'dynamic_vlan', _('RADIUS Dynamic VLAN Assignment'), _('Required: Rejects auth if RADIUS server does not provide appropriate VLAN attributes.'));
|
o = ss.taboption('encryption', form.ListValue, 'dynamic_vlan', _('RADIUS Dynamic VLAN Assignment'), _('Required: Rejects auth if RADIUS server does not provide appropriate VLAN attributes.'));
|
||||||
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
||||||
o.value('0', _('Disabled'));
|
o.value('0', _('Disabled'));
|
||||||
|
@ -1462,6 +1490,7 @@ return view.extend({
|
||||||
o = ss.taboption('encryption', form.Value, 'vlan_bridge', _('RADIUS VLAN Bridge Naming Scheme'), _('E.g. <code>br-vlan</code> or <code>brvlan</code>.'));
|
o = ss.taboption('encryption', form.Value, 'vlan_bridge', _('RADIUS VLAN Bridge Naming Scheme'), _('E.g. <code>br-vlan</code> or <code>brvlan</code>.'));
|
||||||
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
|
||||||
o.rmempty = true;
|
o.rmempty = true;
|
||||||
|
|
||||||
/* extra RADIUS settings end */
|
/* extra RADIUS settings end */
|
||||||
|
|
||||||
o = ss.taboption('encryption', form.Value, 'dae_client', _('DAE-Client'), _('Dynamic Authorization Extension client.'));
|
o = ss.taboption('encryption', form.Value, 'dae_client', _('DAE-Client'), _('Dynamic Authorization Extension client.'));
|
||||||
|
|
Loading…
Reference in a new issue