]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: emit a raw 64-hex PSK unquoted for station mode
authorFelix Fietkau <nbd@nbd.name>
Fri, 10 Jul 2026 11:58:55 +0000 (13:58 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 16 Jul 2026 09:50:21 +0000 (11:50 +0200)
A 64-character hex PSK was always quoted, but wpa_supplicant rejects a
quoted passphrase longer than 63 characters, so the network block failed
and the STA never associated while netifd still reported the radio up. Emit
the key unquoted when it is a 64-character raw PMK, matching the AP path.
The sae_password branch keeps quoting, as SAE passwords are arbitrary
strings.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc

index 80c9bd91e7f8c26c6ace10ed7da7ec426ded1189..9fc44fb4f255b2ac1263a2679b1508fffe257133 100644 (file)
@@ -141,6 +141,8 @@ function setup_sta(data, config) {
 
                if (config.mode == 'mesh' || config.auth_type == 'sae')
                        config.sae_password = `"${config.key}"`;
+               else if (length(config.key) == 64)
+                       config.psk = config.key;
                else
                        config.psk = `"${config.key}"`;