From b1dc2736db879836746d0ed47d8cf8669149f567 Mon Sep 17 00:00:00 2001 From: Youfu Zhang Date: Tue, 27 Jan 2026 15:11:15 +0800 Subject: [PATCH] wifi-scripts: fix ucode mobility_domain default value The mobility_domain value generated by ucode differed from the previous shell script implementation. The legacy shell script used `echo` on the SSID, which appended a trailing newline. To maintain roaming compatibility with pre-25.12 releases and OpenWrt forks in default configuration, update the ucode logic to include this newline character when generating the default value. Fixes: #21731 Signed-off-by: Youfu Zhang Link: https://github.com/openwrt/openwrt/pull/21732 Signed-off-by: Hauke Mehrtens (cherry picked from commit 1d0e2859c5c7cd01c1092019b89dd0f56bf3dda8) --- .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5f1d110ce6..4585998d30 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 @@ -363,7 +363,7 @@ function iface_roaming(config) { if (!config.ieee80211r || config.wpa < 2) return; - set_default(config, 'mobility_domain', substr(md5(config.ssid), 0, 4)); + set_default(config, 'mobility_domain', substr(md5(config.ssid + '\n'), 0, 4)); set_default(config, 'ft_psk_generate_local', config.auth_type == 'psk'); set_default(config, 'ft_iface', config.network_ifname);