size_t group_ssid_len = 0;
int he;
bool allow_6ghz;
- bool p2p2;
+ bool p2p2, skip_prov;
u16 bootstrap = 0;
const char *password = NULL;
char *token, *context = NULL;
* [persistent|persistent=<network id>]
* [join] [auth] [go_intent=<0..15>] [freq=<in MHz>] [provdisc]
* [ht40] [vht] [he] [edmg] [auto] [ssid=<hexdump>]
- * [p2p2] [bstrapmethod=<value>] [password=<string>]
+ * [p2p2] [skip_prov] [bstrapmethod=<value>] [password=<string>]
*/
if (hwaddr_aton(cmd, addr))
he = (os_strstr(cmd, " he") != NULL) || wpa_s->conf->p2p_go_he;
edmg = (os_strstr(cmd, " edmg") != NULL) || wpa_s->conf->p2p_go_edmg;
p2p2 = os_strstr(pos, " p2p2") != NULL;
+ skip_prov = os_strstr(pos, " skip_prov") != NULL;
pos2 = os_strstr(pos, " go_intent=");
if (pos2) {
auth, go_intent, freq, freq2, persistent_id,
pd, ht40, vht, max_oper_chwidth, he, edmg,
group_ssid, group_ssid_len, allow_6ghz, p2p2,
- bootstrap, password);
+ bootstrap, password, skip_prov);
if (new_pin == -2) {
os_memcpy(buf, "FAIL-CHANNEL-UNAVAILABLE\n", 25);
return 25;
wpa_sm_pmksa_cache_add_entry(wpa_s->wpa, entry);
ssid->pmk_valid = true;
+ } else if (res->akmp == WPA_KEY_MGMT_SAE && res->sae_password[0]) {
+ ssid->auth_alg = WPA_AUTH_ALG_SAE;
+ ssid->sae_password = os_strdup(res->sae_password);
+ if (!ssid->sae_password)
+ return;
}
if (res->psk_set) {
wpa_s->p2p_go_he,
wpa_s->p2p_go_edmg,
NULL, 0, is_p2p_allow_6ghz(wpa_s->global->p2p),
- wpa_s->p2p2, wpa_s->p2p_bootstrap, NULL);
+ wpa_s->p2p2, wpa_s->p2p_bootstrap, NULL, false);
}
is_p2p_allow_6ghz(wpa_s->global->p2p),
wpa_s->p2p2, wpa_s->p2p_bootstrap,
wpa_s->pending_join_password[0] ?
- wpa_s->pending_join_password : NULL);
+ wpa_s->pending_join_password : NULL,
+ false);
return;
}
res.freq = bss->freq;
res.ssid_len = bss->ssid_len;
os_memcpy(res.ssid, bss->ssid, bss->ssid_len);
+ os_memcpy(res.peer_interface_addr, bss->bssid,
+ ETH_ALEN);
wpa_printf(MSG_DEBUG, "P2P: Join target GO operating frequency from BSS table: %d MHz (SSID %s)",
bss->freq,
wpa_ssid_txt(bss->ssid, bss->ssid_len));
* @bootstrap: Requested bootstrap method for pairing in P2P2
* @password: Password for pairing setup or NULL for opportunistic method
* in P2P2
+ * @skip_prov: Connect without provisioning
* Returns: 0 or new PIN (if pin was %NULL) on success, -1 on unspecified
* failure, -2 on failure due to channel not currently available,
* -3 if forced channel is not supported
unsigned int vht_chwidth, int he, int edmg,
const u8 *group_ssid, size_t group_ssid_len,
bool allow_6ghz, bool p2p2, u16 bootstrap,
- const char *password)
+ const char *password, bool skip_prov)
{
int force_freq = 0, pref_freq = 0;
int ret = 0, res;
if (password)
os_strlcpy(wpa_s->pending_join_password, password,
sizeof(wpa_s->pending_join_password));
+
+ if (skip_prov) {
+ if (!wpa_s->p2p2) {
+ wpa_printf(MSG_DEBUG,
+ "P2P: Join without provisioning not supported");
+ return -1;
+ }
+ /* Start join operation immediately */
+ return wpas_p2p_join_start(wpa_s, 0, group_ssid,
+ group_ssid_len);
+ }
if (wpas_p2p_join(wpa_s, iface_addr, dev_addr, wps_method,
auto_join, freq,
group_ssid, group_ssid_len) < 0)
wpa_s->p2p_go_he,
wpa_s->p2p_go_edmg,
NULL, 0, is_p2p_allow_6ghz(wpa_s->global->p2p),
- wpa_s->p2p2, wpa_s->p2p_bootstrap, NULL);
+ wpa_s->p2p2, wpa_s->p2p_bootstrap, NULL, false);
return ret;
}
wpa_s->p2p_go_he, wpa_s->p2p_go_edmg,
params->go_ssid_len ? params->go_ssid : NULL,
params->go_ssid_len, false, wpa_s->p2p2,
- wpa_s->p2p_bootstrap, NULL);
+ wpa_s->p2p_bootstrap, NULL, false);
}
-1, 0, 1, 1, wpa_s->p2p_go_max_oper_chwidth,
wpa_s->p2p_go_he, wpa_s->p2p_go_edmg,
NULL, 0, false, wpa_s->p2p2,
- wpa_s->p2p_bootstrap, NULL);
+ wpa_s->p2p_bootstrap, NULL, false);
}
-1, 0, 1, 1, wpa_s->p2p_go_max_oper_chwidth,
wpa_s->p2p_go_he, wpa_s->p2p_go_edmg,
NULL, 0, false, wpa_s->p2p2,
- wpa_s->p2p_bootstrap, NULL);
+ wpa_s->p2p_bootstrap, NULL, false);
if (res)
return res;