From fd035cba9a49b92cd034552365e6b5cdf29537c7 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 27 Sep 2022 10:31:53 -0500 Subject: [PATCH] station: Lookup preauth target on the network There may be situations (due to Multi-BSS operation) where an AP might be advertising multiple SSIDs on the same BSSID. It is thus more correct to lookup the preauthentication target on the network object instead of the station bss_list. It used to be that the network list of bsses was not updated when roam scan was performed. Hence the lookup was always performed on the station bss_list. But this is no longer the case, so it is safer to lookup on the network object directly on the network. --- src/station.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/station.c b/src/station.c index 868bb725..798fab89 100644 --- a/src/station.c +++ b/src/station.c @@ -2136,8 +2136,8 @@ static void station_preauthenticate_cb(struct netdev *netdev, if (!station->preparing_roam || result == NETDEV_RESULT_ABORTED) return; - bss = l_queue_find(station->bss_list, bss_match_bssid, - station->preauth_bssid); + bss = network_bss_find_by_addr(station->connected_network, + station->preauth_bssid); if (!bss) { l_error("Roam target BSS not found"); station_roam_failed(station);