The check for PBC overlap on a partner link should not be done unless
the current interface is actually in active PBC mode. Furthermore, the
wpa_s->wps_overlap variable needs to be cleared in additional places to
avoid leaving it set indefinitely.
This was found with the following test case sequence:
dbus_wps_pbc_overlap dbus_p2p_two_groups
Fixes: b43e19f3f369 ("WPS: Cross band overlap detection with multiple interfaces")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
struct wpa_bss *selected,
struct wpa_ssid *ssid)
{
- if (wpas_wps_partner_link_overlap_detect(wpa_s) ||
+ if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
+ wpas_wps_partner_link_overlap_detect(wpa_s)) ||
wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_OVERLAP
"PBC session overlap");
*/
wpas_notify_wps_event_fail(wpa_s, &data.fail);
wpa_s->supp_pbc_active = false;
+ wpa_s->wps_overlap = false;
wpas_clear_wps(wpa_s);
}
}
wpa_s->supp_pbc_active = false;
+ wpa_s->wps_overlap = false;
wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_CANCEL);
wpa_s->after_wps = 0;