wpa_s->p2p2 is used to track whether a new P2P connection is using P2P2.
However, it was not cleared in some cases and that could result in
unexpected behavior and failures, e.g., with NFC-initiated P2P.
Clear wpa_s->p2p2 for the operations that start NFC-based P2P
connection. In addition, clear it on the FLUSH control interface
command.
This showed up with the following test case sequence:
p2p_pairing_opportunistic nfc_p2p_static_handover_tagdev_client
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_s->parent->p2ps_method_config_any = 0;
if (wpa_s->global->p2p)
p2p_flush(wpa_s->global->p2p);
+
+ wpa_s->p2p2 = false;
}
return NULL;
}
+ wpa_s->p2p2 = false;
+
if (cli_freq == 0) {
wsc = wps_build_nfc_handover_req_p2p(
wpa_s->parent->wps, wpa_s->conf->wps_nfc_dh_pubkey);
&wpa_s->conf->wps_nfc_dh_privkey) < 0)
return NULL;
+ wpa_s->p2p2 = false;
+
if (cli_freq == 0) {
wsc = wps_build_nfc_handover_sel_p2p(
wpa_s->parent->wps,
params.oob_dev_pw, WPS_OOB_PUBKEY_HASH_LEN);
wpa_s->p2p_peer_oob_pk_hash_known = 1;
+ wpa_s->p2p2 = false;
+
if (tag) {
if (id < 0x10) {
wpa_printf(MSG_DEBUG, "P2P: Static handover - invalid "