wifi-scripts: ucode: fix r0kh/r1kh parsing
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run

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 <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2025-09-25 13:02:39 +02:00
parent adb1ce158a
commit 0da0a6c449

View file

@ -340,12 +340,16 @@ function iface_roaming(config) {
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 ]);
}
for (let name in [ 'r0kh', 'r1kh' ])
for (let val in config[name])
append(name, join(' ', split(val, ',', 3)));
append_vars(config, [
'r0kh', 'r1kh', 'r1_key_holder', 'r0_key_lifetime', 'pmk_r1_push'
'r1_key_holder', 'r0_key_lifetime', 'pmk_r1_push'
]);
}