Skip to content

Commit f778841

Browse files
bugjoshclaude
authored andcommitted
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 b1dc273. Fixes: openwrt#21768 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com> Link: openwrt#22677 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit b178e05)
1 parent ca11c6b commit f778841

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi

package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,11 @@ function iface_auth_type(config) {
153153
config.vlan_possible = 1;
154154

155155
if (config.fils) {
156-
set_default(config, 'erp_domain', substr(md5(config.ssid), 0, 4));
156+
set_default(config, 'erp_domain', config.mobility_domain);
157+
set_default(config, 'erp_domain', substr(md5(config.ssid + '\n'), 0, 8));
157158
set_default(config, 'fils_realm', config.erp_domain);
158159
set_default(config, 'erp_send_reauth_start', 1);
159-
set_default(config, 'fils_cache_id', substr(md5(config.fils_realm), 0, 4));
160+
set_default(config, 'fils_cache_id', substr(md5(config.fils_realm + '\n'), 0, 4));
160161
}
161162

162163
if (!config.eap_server) {

0 commit comments

Comments
 (0)