[openwrt/openwrt] wifi-scripts: fix roaming setup with ucode scripts

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 5 06:08:30 PST 2024


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1aa2695620891afe718ed38930a7a8305871b86c

commit 1aa2695620891afe718ed38930a7a8305871b86c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Dec 5 14:17:32 2024 +0100

    wifi-scripts: fix roaming setup with ucode scripts
    
    - fix variable references for ft key
    - add r0kh and r1kh if ft_generate_local is not set (logic inversion bug)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
index 37864487c3..8db3fc34b3 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
@@ -334,15 +334,15 @@ function iface_roaming(config) {
 	set_default(config, 'ft_psk_generate_local', config.auth_type == 'psk');
 	set_default(config, 'ft_iface', config.network_ifname);
 
-	if (config.ft_psk_generate_local) {
+	if (!config.ft_psk_generate_local) {
 		if (!config.r0kh || !config.r1kh) {
 			if (!config.auth_secret && !config.key)
 				netifd.setup_failed('FT_KEY_CANT_BE_DERIVED');
 
-			let ft_key = md5(`${mobility_domain}/${auth_secret ?? key}`);
+			let ft_key = md5(`${config.mobility_domain}/${config.auth_secret ?? config.key}`);
 
-			set_default(config, 'r0kh', 'ff:ff:ff:ff:ff:ff,*,' + ft_key);
-			set_default(config, 'r1kh', '00:00:00:00:00:00,00:00:00:00:00:00,' + ft_key);
+			set_default(config, 'r0kh', 'ff:ff:ff:ff:ff:ff * ' + ft_key);
+			set_default(config, 'r1kh', '00:00:00:00:00:00 00:00:00:00:00:00 ' + ft_key);
 		}
 
 		append_vars(config, [




More information about the lede-commits mailing list