WPS: Add a workaround for Windows 7 capability discovery for PBC
Windows 7 uses incorrect way of figuring out AP's WPS capabilities by acting as a Registrar and using M1 from the AP. The config methods attribute in that message is supposed to indicate only the configuration method supported by the AP in Enrollee role, i.e., to add an external Registrar. For that case, PBC shall not be used and as such, the PushButton config method is removed from M1 by default. If pbc_in_m1=1 is included in the configuration file, the PushButton config method is left in M1 (if included in config_methods parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from a label in the AP).
This commit is contained in:
parent
bcb90f750d
commit
fa5165586f
14 changed files with 43 additions and 1 deletions
|
@ -110,6 +110,8 @@ struct eap_config {
|
|||
const struct wpabuf *assoc_p2p_ie;
|
||||
const u8 *peer_addr;
|
||||
int fragment_size;
|
||||
|
||||
int pbc_in_m1;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -192,6 +192,8 @@ struct eap_sm {
|
|||
|
||||
/* Fragmentation size for EAP method init() handler */
|
||||
int fragment_size;
|
||||
|
||||
int pbc_in_m1;
|
||||
};
|
||||
|
||||
int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,
|
||||
|
|
|
@ -1261,6 +1261,7 @@ struct eap_sm * eap_server_sm_init(void *eapol_ctx,
|
|||
os_memcpy(sm->peer_addr, conf->peer_addr, ETH_ALEN);
|
||||
sm->fragment_size = conf->fragment_size;
|
||||
sm->pwd_group = conf->pwd_group;
|
||||
sm->pbc_in_m1 = conf->pbc_in_m1;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "EAP: Server state machine created");
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
|||
cfg.p2p_dev_addr = p2p_get_go_dev_addr(sm->assoc_p2p_ie);
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
cfg.pbc_in_m1 = sm->pbc_in_m1;
|
||||
data->wps = wps_init(&cfg);
|
||||
if (data->wps == NULL) {
|
||||
os_free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue