P2P: Limit p2p_connect .. pbc join based on BSSID

Allow only the expected P2P Interface Address as the BSSID for
the AP to avoid selecting incorrect BSS should there be another
device that is advertising active PBC mode before the target
P2P GO does.
This commit is contained in:
Jouni Malinen 2010-10-12 16:56:17 +03:00 committed by Jouni Malinen
parent 68d6fe5693
commit 3b29972c09

View File

@ -700,13 +700,14 @@ static int wpas_copy_go_neg_results(struct wpa_supplicant *wpa_s,
static void wpas_start_wps_enrollee(struct wpa_supplicant *wpa_s, static void wpas_start_wps_enrollee(struct wpa_supplicant *wpa_s,
struct p2p_go_neg_results *res) struct p2p_go_neg_results *res)
{ {
wpa_printf(MSG_DEBUG, "P2P: Start WPS Enrollee for peer " MACSTR,
MAC2STR(res->peer_interface_addr));
wpa_hexdump_ascii(MSG_DEBUG, "P2P: Start WPS Enrollee for SSID", wpa_hexdump_ascii(MSG_DEBUG, "P2P: Start WPS Enrollee for SSID",
res->ssid, res->ssid_len); res->ssid, res->ssid_len);
wpa_supplicant_ap_deinit(wpa_s); wpa_supplicant_ap_deinit(wpa_s);
wpas_copy_go_neg_results(wpa_s, res); wpas_copy_go_neg_results(wpa_s, res);
if (res->wps_method == WPS_PBC) if (res->wps_method == WPS_PBC)
wpas_wps_start_pbc(wpa_s, NULL /* res->peer_interface_addr */, wpas_wps_start_pbc(wpa_s, res->peer_interface_addr, 1);
1);
else { else {
u16 dev_pw_id = DEV_PW_DEFAULT; u16 dev_pw_id = DEV_PW_DEFAULT;
if (wpa_s->p2p_wps_method == WPS_PIN_KEYPAD) if (wpa_s->p2p_wps_method == WPS_PIN_KEYPAD)