eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 59d36cf24f7698ed936c9b23ee559715870c7a45
parent edf556cc7bb9a323e1df0cec6e35654ceffb5f8f
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 28 Sep 2022 11:33:51 -0700

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.

Diffstat:
Msrc/ft.c | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/ft.c b/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);