summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorMichael Yartys <mail@yartys.no>2024-03-02 21:23:55 +0100
committerPaul Donald <newtwen+github@gmail.com>2024-07-26 01:48:12 +0200
commit75422e1034893cda4f29f1e3713ce4629dc87119 (patch)
tree0ae6b6c9b30045b6f150fd3886b8873b6890ae03 /modules/luci-mod-network/htdocs/luci-static/resources
parentc082d458edcecabab458efdcad82edfd28f5cbe2 (diff)
luci-mod-network: wireless.js: expose ocv settings
Make it possible to set Operating Channel Validation through luci. Signed-off-by: Michael Yartys <mail@yartys.no>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index fcc47570ef..3efd07f7f4 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -1842,6 +1842,27 @@ return view.extend({
o.placeholder = '201';
o.rmempty = true;
+ if (L.hasSystemFeature('hostapd', 'ocv') || L.hasSystemFeature('wpasupplicant', 'ocv')) {
+ o = ss.taboption('encryption', form.ListValue, 'ocv', _('Operating Channel Validation'), _("Note: Workaround mode allows a STA that claims OCV capability to connect even if the STA doesn't send OCI or negotiate PMF."));
+ o.value('0', _('Disabled'));
+ o.value('1', _('Enabled'));
+ o.value('2', _('Enabled (workaround mode)'));
+ o.default = '0';
+ o.depends('ieee80211w', '1');
+ o.depends('ieee80211w', '2');
+
+ o.validate = function(section_id, value) {
+ var modeopt = this.section.children.filter(function(o) { return o.option == 'mode' })[0],
+ modeval = modeopt.formvalue(section_id);
+
+ if ((value == '2') && ((modeval == 'sta') || (modeval == 'sta-wds'))) {
+ return _('Workaround mode can only be used when acting as an access point.');
+ }
+
+ return true;
+ }
+ }
+
o = ss.taboption('encryption', form.Flag, 'wpa_disable_eapol_key_retries', _('Enable key reinstallation (KRACK) countermeasures'), _('Complicates key reinstallation attacks on the client side by disabling retransmission of EAPOL-Key frames that are used to install keys. This workaround might cause interoperability issues and reduced robustness of key negotiation especially in environments with heavy traffic load.'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk2', 'psk-mixed', 'sae', 'sae-mixed', 'wpa2', 'wpa3', 'wpa3-mixed'] });