WPS: Store device info and make it available through AP ctrl_iface
Store a copy of device attributes during WPS protocol run and make it available for external programs via the control interface STA MIB command for associated stations. This gives access to device name and type which can be useful when showing user information about associated stations.
This commit is contained in:
parent
52eb293dd2
commit
2678509dec
13 changed files with 170 additions and 1 deletions
|
@ -1238,6 +1238,8 @@ struct eap_sm * eap_server_sm_init(void *eapol_ctx,
|
|||
sm->wps = conf->wps;
|
||||
if (conf->assoc_wps_ie)
|
||||
sm->assoc_wps_ie = wpabuf_dup(conf->assoc_wps_ie);
|
||||
if (conf->peer_addr)
|
||||
os_memcpy(sm->peer_addr, conf->peer_addr, ETH_ALEN);
|
||||
|
||||
wpa_printf(MSG_DEBUG, "EAP: Server state machine created");
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ struct eap_config {
|
|||
int tnc;
|
||||
struct wps_context *wps;
|
||||
const struct wpabuf *assoc_wps_ie;
|
||||
const u8 *peer_addr;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -185,6 +185,8 @@ struct eap_sm {
|
|||
struct wpabuf *assoc_wps_ie;
|
||||
|
||||
Boolean start_reauth;
|
||||
|
||||
u8 peer_addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,
|
||||
|
|
|
@ -126,6 +126,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
|||
cfg.pin_len = sm->user->password_len;
|
||||
}
|
||||
cfg.assoc_wps_ie = sm->assoc_wps_ie;
|
||||
cfg.peer_addr = sm->peer_addr;
|
||||
data->wps = wps_init(&cfg);
|
||||
if (data->wps == NULL) {
|
||||
os_free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue