diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json index c32a49170cb..38886ef336c 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json @@ -963,9 +963,8 @@ "type": "boolean" }, "sae_ext_key": { - "description": "Advertise the SAE-EXT-KEY AKM alongside plain SAE. Mandatory for EHT, enabled by default.", - "type": "boolean", - "default": true + "description": "Advertise the SAE-EXT-KEY AKM (SAE using a group-dependent hash) alongside plain SAE. Mandatory for EHT, recommended otherwise. Defaults off for sae and sae-mixed because some clients misbehave when SAE-EXT-KEY is offered, and on for sae-compat BSSes using an EHT htmode (where SAE-EXT-KEY is mandatory), carried in a separate RSN Override element that legacy clients ignore.", + "type": "boolean" }, "sae_password_file": { "description": "External file containing VLAN SAE MAC address triplets", diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc index a05a0d39202..a0efea0d74a 100644 --- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc +++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc @@ -19,6 +19,18 @@ export function parse_encryption(config, dev_config, phy_features) { config.auth_type = encryption[0] ?? 'none'; + /* + * The SAE-EXT-KEY (SAE-GDH) AKM is only mandatory for EHT/MLO and breaks + * interoperability with some clients, so only default it on where it is + * both required and safe to offer: on Compatibility mode (sae-compat) + * BSSes that run an EHT htmode, which carry it in a separate RSN Override + * element that legacy clients ignore. It stays off for WPA3-Personal (sae) + * and Transition (sae-mixed) mode and on non-EHT BSSes. An explicit + * sae_ext_key option overrides this per BSS. + */ + let compat = (config.auth_type == 'sae-compat'); + config.sae_ext_key ??= compat && wildcard(dev_config?.htmode ?? '', 'EHT*'); + switch(config.auth_type) { case 'owe': config.auth_type = 'owe'; @@ -189,7 +201,7 @@ export function wpa_key_mgmt(config, band) { if (config.ieee80211r) append_value(config, 'wpa_key_mgmt', 'FT-SAE'); - if (config.sae_ext_key && config.rsn_override_pairwise_2) { + if (config.sae_ext_key) { append_value(config, 'rsn_override_key_mgmt_2', 'SAE-EXT-KEY'); if (config.ieee80211r) append_value(config, 'rsn_override_key_mgmt_2', 'FT-SAE-EXT-KEY'); @@ -205,7 +217,7 @@ export function wpa_key_mgmt(config, band) { if (config.ieee80211r) append_value(config, 'rsn_override_key_mgmt', 'FT-SAE'); - if (config.sae_ext_key && config.rsn_override_pairwise_2) { + if (config.sae_ext_key) { append_value(config, 'rsn_override_key_mgmt_2', 'SAE-EXT-KEY'); if (config.ieee80211r) append_value(config, 'rsn_override_key_mgmt_2', 'FT-SAE-EXT-KEY');