aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-12-30 17:06:19 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-30 17:06:19 (GMT)
commit438be60153dbfe3e3da9d53edb5e7b1b1dac7567 (patch)
treec58caf1fca5f843763df1f8ca5dffdc7a01c6d6c /wpa_supplicant/p2p_supplicant.c
parent35510d530a16d4e3462703937bf918e5d5d26bff (diff)
downloadhostap-438be60153dbfe3e3da9d53edb5e7b1b1dac7567.zip
hostap-438be60153dbfe3e3da9d53edb5e7b1b1dac7567.tar.gz
hostap-438be60153dbfe3e3da9d53edb5e7b1b1dac7567.tar.bz2
P2P: Do not accept any GO BSS entry if SSID is specified for join
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>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a456d3e..16c1962 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -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,