Skip to content

Commit 0da0a6c

Browse files
committed
wifi-scripts: ucode: fix r0kh/r1kh parsing
The option is an array, and for each entry there should be one generated line in hostapd.conf. Commas also need to be replaced with whitespace Signed-off-by: Felix Fietkau <[email protected]>
1 parent adb1ce1 commit 0da0a6c

File tree

1 file changed

+7
-3
lines changed
  • package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,16 @@ function iface_roaming(config) {
340340

341341
let ft_key = md5(`${config.mobility_domain}/${config.auth_secret ?? config.key}`);
342342

343-
set_default(config, 'r0kh', 'ff:ff:ff:ff:ff:ff * ' + ft_key);
344-
set_default(config, 'r1kh', '00:00:00:00:00:00 00:00:00:00:00:00 ' + ft_key);
343+
set_default(config, 'r0kh', [ 'ff:ff:ff:ff:ff:ff,*,' + ft_key ]);
344+
set_default(config, 'r1kh', [ '00:00:00:00:00:00,00:00:00:00:00:00,' + ft_key ]);
345345
}
346346

347+
for (let name in [ 'r0kh', 'r1kh' ])
348+
for (let val in config[name])
349+
append(name, join(' ', split(val, ',', 3)));
350+
347351
append_vars(config, [
348-
'r0kh', 'r1kh', 'r1_key_holder', 'r0_key_lifetime', 'pmk_r1_push'
352+
'r1_key_holder', 'r0_key_lifetime', 'pmk_r1_push'
349353
]);
350354
}
351355

0 commit comments

Comments
 (0)