summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Klinesmith2026-03-29 20:19:40 +0000
committerHauke Mehrtens2026-04-04 17:36:13 +0000
commitf778841d027b8796271c38c908b27fecbce03747 (patch)
tree5bdcd964fa6fc2d01663c3fa7144450979a4ad7d
parentca11c6b7e17b5a8cdf239c0dc8da7bd56d0f84f9 (diff)
downloadopenwrt-f778841d027b8796271c38c908b27fecbce03747.tar.gz
wifi-scripts: fix ucode erp_domain and fils_cache_id values
The ucode path generates different erp_domain and fils_cache_id values than the legacy shell path due to three mismatches: 1. erp_domain md5 input missing trailing newline (echo adds \n) 2. erp_domain output truncated to 4 chars instead of 8 (shell uses head -c 8) 3. fils_cache_id md5 input missing trailing newline 4. erp_domain missing fallback to mobility_domain Same bug pattern as mobility_domain fixed in commit b1dc2736db. Fixes: #21768 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22677 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit b178e05d9b241fe3dc2c48cc5011e1ffa86c9e4b)
-rw-r--r--package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc5
1 files changed, 3 insertions, 2 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 0629e70409..27ef4e2ac3 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
@@ -153,10 +153,11 @@ function iface_auth_type(config) {
config.vlan_possible = 1;
if (config.fils) {
- set_default(config, 'erp_domain', substr(md5(config.ssid), 0, 4));
+ set_default(config, 'erp_domain', config.mobility_domain);
+ set_default(config, 'erp_domain', substr(md5(config.ssid + '\n'), 0, 8));
set_default(config, 'fils_realm', config.erp_domain);
set_default(config, 'erp_send_reauth_start', 1);
- set_default(config, 'fils_cache_id', substr(md5(config.fils_realm), 0, 4));
+ set_default(config, 'fils_cache_id', substr(md5(config.fils_realm + '\n'), 0, 4));
}
if (!config.eap_server) {