wpa_supplicant: Support Multi-AP backhaul STA onboarding with WPS
The Wi-Fi Alliance Multi-AP Specification v1.0 allows onboarding of a backhaul STA through WPS. To enable this, the backhaul STA needs to add a Multi-AP IE to the WFA vendor extension element in the WSC M1 message that indicates it supports the Multi-AP backhaul STA role. The Registrar (if it support Multi-AP onboarding) will respond to that with a WSC M8 message that also contains the Multi-AP IE, and that contains the credentials for the backhaul SSID (which may be different from the SSID on which WPS is performed). Introduce a new parameter to wpas_wps_start_pbc() and allow it to be set via control interface's new multi_ap=1 parameter of WPS_PBC call. multi_ap_backhaul_sta is set to 1 in the automatically created SSID. Thus, if the AP does not support Multi-AP, association will fail and WPS will be terminated. Only wps_pbc is supported. This commit adds the multi_ap argument only to the control socket interface, not to the D-Bus interface. Since WPS associates with the fronthaul BSS instead of the backhaul BSS, we should not drop association if the AP announces fronthaul-only BSS. Still, we should only do that in the specific case of WPS. Therefore, add a check to multi_ap_process_assoc_resp() to allow association with a fronthaul-only BSS if and only if key_mgmt contains WPS. Signed-off-by: Davina Lu <ylu@quantenna.com> Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Cc: Marianna Carrera <marianna.carrera.so@quantenna.com>
This commit is contained in:
parent
56a2d788f9
commit
83ebf55865
12 changed files with 54 additions and 11 deletions
|
@ -255,6 +255,9 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
|||
cfg.new_ap_settings = &new_ap_settings;
|
||||
}
|
||||
|
||||
if (os_strstr(phase1, "multi_ap=1"))
|
||||
cfg.multi_ap_backhaul_sta = 1;
|
||||
|
||||
data->wps = wps_init(&cfg);
|
||||
if (data->wps == NULL) {
|
||||
os_free(data);
|
||||
|
|
|
@ -145,6 +145,8 @@ struct wps_data * wps_init(const struct wps_config *cfg)
|
|||
data->peer_pubkey_hash_set = 1;
|
||||
}
|
||||
|
||||
data->multi_ap_backhaul_sta = cfg->multi_ap_backhaul_sta;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
@ -187,6 +187,12 @@ struct wps_config {
|
|||
* peer_pubkey_hash - Peer public key hash or %NULL if not known
|
||||
*/
|
||||
const u8 *peer_pubkey_hash;
|
||||
|
||||
/**
|
||||
* multi_ap_backhaul_sta - Whether this is a Multi-AP backhaul STA
|
||||
* enrollee
|
||||
*/
|
||||
int multi_ap_backhaul_sta;
|
||||
};
|
||||
|
||||
struct wps_data * wps_init(const struct wps_config *cfg);
|
||||
|
|
|
@ -105,6 +105,7 @@ static struct wpabuf * wps_build_m1(struct wps_data *wps)
|
|||
{
|
||||
struct wpabuf *msg;
|
||||
u16 config_methods;
|
||||
u8 multi_ap_backhaul_sta = 0;
|
||||
|
||||
if (random_get_bytes(wps->nonce_e, WPS_NONCE_LEN) < 0)
|
||||
return NULL;
|
||||
|
@ -134,6 +135,9 @@ static struct wpabuf * wps_build_m1(struct wps_data *wps)
|
|||
WPS_CONFIG_PHY_PUSHBUTTON);
|
||||
}
|
||||
|
||||
if (wps->multi_ap_backhaul_sta)
|
||||
multi_ap_backhaul_sta = MULTI_AP_BACKHAUL_STA;
|
||||
|
||||
if (wps_build_version(msg) ||
|
||||
wps_build_msg_type(msg, WPS_M1) ||
|
||||
wps_build_uuid_e(msg, wps->uuid_e) ||
|
||||
|
@ -152,7 +156,7 @@ static struct wpabuf * wps_build_m1(struct wps_data *wps)
|
|||
wps_build_dev_password_id(msg, wps->dev_pw_id) ||
|
||||
wps_build_config_error(msg, WPS_CFG_NO_ERROR) ||
|
||||
wps_build_os_version(&wps->wps->dev, msg) ||
|
||||
wps_build_wfa_ext(msg, 0, NULL, 0, 0) ||
|
||||
wps_build_wfa_ext(msg, 0, NULL, 0, multi_ap_backhaul_sta) ||
|
||||
wps_build_vendor_ext_m1(&wps->wps->dev, msg)) {
|
||||
wpabuf_free(msg);
|
||||
return NULL;
|
||||
|
|
|
@ -125,6 +125,8 @@ struct wps_data {
|
|||
int pbc_in_m1;
|
||||
|
||||
struct wps_nfc_pw_token *nfc_pw_token;
|
||||
|
||||
int multi_ap_backhaul_sta;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue