]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make INTERWORKING_CONNECT more reliable in testing environment
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2020 16:49:01 +0000 (18:49 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2020 17:20:44 +0000 (19:20 +0200)
Pick the most recently added BSS entry based on BSSID matching to avoid
issues in testing environment where the SSID of the AP may have changed
and both the old and new BSS is still present in the scan results.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c

index 8d75c80b277dff98174d5a47ab0866276373b960..c9074a239ff9c1eca603b923a4cd89c94a515055 100644 (file)
@@ -7196,7 +7196,7 @@ static int ctrl_interworking_connect(struct wpa_supplicant *wpa_s, char *dst,
                return -1;
        }
 
-       bss = wpa_bss_get_bssid(wpa_s, bssid);
+       bss = wpa_bss_get_bssid_latest(wpa_s, bssid);
        if (bss == NULL) {
                wpa_printf(MSG_DEBUG, "Could not find BSS " MACSTR,
                           MAC2STR(bssid));