]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not accept any GO BSS entry if SSID is specified for join
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 30 Dec 2015 17:06:19 +0000 (19:06 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 30 Dec 2015 17:06:19 +0000 (19:06 +0200)
Accept only a BSS entry matching the SSID when trying to find the
operating channel of a GO during join operation for which the SSID was
already specified. Previously, it could have been possible to pick an
incorrect BSS entry if the new GO was not found in the latest scan and
there was an older cached scan entry for the same BSSID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/p2p_supplicant.c

index a456d3edb903eb8aab903fcf83c0cde9a01706a2..16c196297bc027e00fd6514065ee70b16efee4d4 100644 (file)
@@ -4825,8 +4825,7 @@ static void wpas_p2p_scan_res_join(struct wpa_supplicant *wpa_s,
                bss = wpa_bss_get(wpa_s, wpa_s->pending_join_iface_addr,
                                  wpa_s->p2p_join_ssid,
                                  wpa_s->p2p_join_ssid_len);
-       }
-       if (!bss) {
+       } else if (!bss) {
                wpa_printf(MSG_DEBUG, "P2P: Trying to find target GO BSS entry based on BSSID "
                           MACSTR, MAC2STR(wpa_s->pending_join_iface_addr));
                bss = wpa_bss_get_bssid_latest(wpa_s,