set_default(config, 'ft_psk_generate_local', config.auth_type == 'psk');
set_default(config, 'ft_iface', config.network_ifname);
- if (config.ft_psk_generate_local) {
+ if (!config.ft_psk_generate_local) {
if (!config.r0kh || !config.r1kh) {
if (!config.auth_secret && !config.key)
netifd.setup_failed('FT_KEY_CANT_BE_DERIVED');
- let ft_key = md5(`${mobility_domain}/${auth_secret ?? key}`);
+ 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);
}
append_vars(config, [