luci-mod-network: (wireless) Expose WPA Enterprise RADIUS VLAN settings. 5569/head
authorPaul Dee <itsascambutmailmeanyway@gmail.com>
Thu, 2 Dec 2021 19:37:39 +0000 (20:37 +0100)
committerPaul Dee <itsascambutmailmeanyway@gmail.com>
Sat, 10 Dec 2022 14:33:04 +0000 (15:33 +0100)
Tested on: 21.02.1

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index dec45862688f783666e9e8bf572fdfba7fbc4fea..11156ad70ee09b6970c82a5c0ee5af57c8e5dd2c 100644 (file)
@@ -1436,6 +1436,38 @@ return view.extend({
                                o.rmempty = true;
                                o.password = true;
 
+                               /* extra RADIUS settings start */
+                               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'] });
+                               o.value('0', _('Disabled'));
+                               o.value('1', _('Optional'));
+                               o.value('2', _('Required'));
+                               o.write = function (section_id, value) {
+                                       return this.super('write', [section_id, (value == 0) ? null: value]);
+                               }
+
+                               o = ss.taboption('encryption', form.Flag, 'per_sta_vif', _('RADIUS Per STA VLAN'), _('Each STA is assigned its own AP_VLAN interface.'));
+                               add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
+
+                               //hostapd internally defaults to vlan_naming=1 even with dynamic VLAN off
+                               o = ss.taboption('encryption', form.Flag, 'vlan_naming', _('RADIUS VLAN Naming'), _('Off: <code>vlanXXX</code>, e.g., <code>vlan1</code>. On: <code>vlan_tagged_interface.XXX</code>, e.g. <code>eth0.1</code>.'));
+                               add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
+
+                               o = ss.taboption('encryption', widgets.DeviceSelect, 'vlan_tagged_interface', _('RADIUS VLAN Tagged Interface'), _('E.g. eth0, eth1'));
+                               add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
+                               o.size = 1;
+                               o.rmempty = true;
+                               o.multiple = false;
+                               o.noaliases = true;
+                               o.nobridges = true;
+                               o.nocreate = true;
+                               o.noinactive = true;
+
+                               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'] });
+                               o.rmempty = true;
+                               /* extra RADIUS settings end */
+
                                o = ss.taboption('encryption', form.Value, 'dae_client', _('DAE-Client'), _('Dynamic Authorization Extension client.'));
                                add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
                                o.rmempty = true;