]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: fix handling of 64 character WPA key 22182/head
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 25 Feb 2026 23:41:11 +0000 (00:41 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 26 Feb 2026 19:17:31 +0000 (20:17 +0100)
The key variable is not defined in the scope when setting wpa_psk. Use
config.key instead.
This fixes configuration the 64 characters wpa_psk directly.

Reported-by: donjoe in OpenWrt Forum
Link: https://github.com/openwrt/openwrt/pull/22182
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc

index 9e0cc838d4950f42e2a5f2472bf4c5ea834a9872..80271fe9426c58ce6027f80ece10ac2123eb052d 100644 (file)
@@ -134,7 +134,7 @@ function iface_auth_type(config) {
                        config.macaddr_acl = 2;
                        config.wpa_psk_radius = 2;
                } else if (length(config.key) == 64) {
-                       config.wpa_psk = key;
+                       config.wpa_psk = config.key;
                } else if (length(config.key) >= 8 && length(config.key) <= 63) {
                        config.wpa_passphrase = config.key;
                } else if (config.key) {