mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
ft: optimize clearing authentications
Clearing all authentications during ft_authenticate was a very large hammer and may remove cached authentications that could be used if the current auth attempt fails. For example the best BSS may have a problem and fail to authenticate early with FT-over-DS, then fail with FT-over-Air. But another BSS may have succeeded early with FT-over-DS. If ft_authenticate clears all ft_infos that successful authentication will be lost.
This commit is contained in:
parent
edf556cc7b
commit
59d36cf24f
14
src/ft.c
14
src/ft.c
@ -1033,7 +1033,6 @@ int ft_authenticate(uint32_t ifindex, const struct scan_bss *target)
|
||||
target->frequency,
|
||||
200, ft_send_authenticate, info,
|
||||
ft_authenticate_destroy);
|
||||
ft_clear_authentications(ifindex);
|
||||
|
||||
l_queue_push_tail(info_list, info);
|
||||
|
||||
@ -1055,9 +1054,20 @@ int ft_associate(uint32_t ifindex, const uint8_t *addr)
|
||||
* a different BSS.
|
||||
*/
|
||||
info = ft_info_find(ifindex, addr);
|
||||
if (!info || !info->parsed)
|
||||
if (!info)
|
||||
return -ENOENT;
|
||||
|
||||
/*
|
||||
* Either failed or no response. This may have been an FT-over-DS
|
||||
* attempt so clear out the entry so FT-over-Air can try again.
|
||||
*/
|
||||
if (!info->parsed) {
|
||||
l_queue_remove(info_list, info);
|
||||
ft_info_destroy(info);
|
||||
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
ft_prepare_handshake(info, hs);
|
||||
|
||||
ret = ft_tx_reassociate(ifindex, info->frequency, info->prev_bssid);
|
||||
|
Loading…
Reference in New Issue
Block a user