Skip to content

Commit 0f5e634

Browse files
committed
luci-mod-network: rename WPA3 mixed to Transition
Fix issue #8289: Rename 'WPA2-PSK/WPA3-SAE Mixed Mode' to 'WPA2-PSK/WPA3-SAE Transition Mode' to clarify that OpenWrt implements WPA3 Personal Transition mode, not Compatibility mode. This helps differentiate between Transition and Compatibility modes as specified in WPA3 Spec v3.4+. Additionally, implement the WPA3 Spec v3.4 Sections 11.2 and 11.4 requirement that WPA3-Personal Transition Mode does not operate in the 6 GHz band or Sub 1 GHz band. The sae-mixed option is now hidden when 6GHz band is selected. Fixes: #8289 Signed-off-by: Eruis2579 <joewartson757@gmail.com>
1 parent a8e7143 commit 0f5e634

File tree

1 file changed

+47
-1
lines changed
  • modules/luci-mod-network/htdocs/luci-static/resources/view/network

1 file changed

+47
-1
lines changed

modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,9 @@ return view.extend({
13701370

13711371
if (has_ap_sae || has_sta_sae) {
13721372
crypto_modes.push(['sae', 'WPA3-SAE', 31]);
1373-
crypto_modes.push(['sae-mixed', 'WPA2-PSK/WPA3-SAE Mixed Mode', 30]);
1373+
// Note: Per WPA3 Spec v3.4 Sections 11.2 and 11.4, WPA3-Personal Transition Mode
1374+
// does not operate in the 6 GHz band or Sub 1 GHz band
1375+
crypto_modes.push(['sae-mixed', 'WPA2-PSK/WPA3-SAE Transition Mode', 30]);
13741376
}
13751377

13761378
if (has_ap_wep || has_sta_wep) {
@@ -1482,6 +1484,50 @@ return view.extend({
14821484
encr.value(crypto_mode[0], '%s (%s)'.format(crypto_mode[1], security_level));
14831485
});
14841486

1487+
// Per WPA3 Spec v3.4 Sections 11.2 and 11.4, WPA3-Personal Transition Mode
1488+
// does not operate in the 6 GHz band or Sub 1 GHz band
1489+
// Filter out sae-mixed option when 6GHz band is selected
1490+
const originalRenderWidget = encr.renderWidget;
1491+
encr.renderWidget = function(section_id, option_index, cfgvalue) {
1492+
const widget = originalRenderWidget ? originalRenderWidget.apply(this, arguments) : form.ListValue.prototype.renderWidget.apply(this, arguments);
1493+
1494+
// Check if 6GHz band is selected and hide sae-mixed option
1495+
const freqOption = this.section.children.find(function(o) { return o.option === '_freq'; });
1496+
if (freqOption && widget) {
1497+
const select = widget.querySelector ? widget.querySelector('select') : (widget.tagName === 'SELECT' ? widget : null);
1498+
if (select) {
1499+
// Use a MutationObserver or check on change events
1500+
const updateOptions = function() {
1501+
const freqValue = freqOption.formvalue ? freqOption.formvalue(section_id) :
1502+
(freqOption.cfgvalue ? freqOption.cfgvalue(section_id) : null);
1503+
const saeMixedOption = select.querySelector('option[value="sae-mixed"]');
1504+
if (freqValue === '6g' && saeMixedOption) {
1505+
saeMixedOption.style.display = 'none';
1506+
saeMixedOption.disabled = true;
1507+
} else if (saeMixedOption) {
1508+
saeMixedOption.style.display = '';
1509+
saeMixedOption.disabled = false;
1510+
}
1511+
};
1512+
1513+
// Check initially
1514+
updateOptions();
1515+
1516+
// Watch for frequency changes
1517+
if (freqOption.map) {
1518+
const freqWidget = freqOption.map.findElement('data-field', freqOption.cbid(section_id));
1519+
if (freqWidget) {
1520+
const freqSelect = freqWidget.querySelector('select');
1521+
if (freqSelect) {
1522+
freqSelect.addEventListener('change', updateOptions);
1523+
}
1524+
}
1525+
}
1526+
}
1527+
}
1528+
return widget;
1529+
};
1530+
14851531
// QR Code
14861532
o = ss.taboption('encryption', form.DummyValue, '_qrops', _('QR Code'),
14871533
_('SSID and passwords with URIencoded sequences (e.g. %20) may not work.'));

0 commit comments

Comments
 (0)