hostapd: Support external authentication offload in AP mode
Extend commit 5ff39c1380
("SAE: Support external authentication
offload for driver-SME cases") to support external authentication
with drivers that implement AP SME by notifying the status of
SAE authentication to the driver after SAE handshake as the
driver acts as a pass through for the SAE Authentication frames.
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
This commit is contained in:
parent
236e793e7b
commit
4ffb0fefe4
2 changed files with 27 additions and 0 deletions
|
@ -364,4 +364,14 @@ static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,
|
||||||
return hapd->driver->channel_info(hapd->drv_priv, ci);
|
return hapd->driver->channel_info(hapd->drv_priv, ci);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
hostapd_drv_send_external_auth_status(struct hostapd_data *hapd,
|
||||||
|
struct external_auth *params)
|
||||||
|
{
|
||||||
|
if (!hapd->driver || !hapd->drv_priv ||
|
||||||
|
!hapd->driver->send_external_auth_status)
|
||||||
|
return -1;
|
||||||
|
return hapd->driver->send_external_auth_status(hapd->drv_priv, params);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* AP_DRV_OPS */
|
#endif /* AP_DRV_OPS */
|
||||||
|
|
|
@ -701,6 +701,21 @@ static void sae_set_retransmit_timer(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void sae_sme_send_external_auth_status(struct hostapd_data *hapd,
|
||||||
|
struct sta_info *sta, u16 status)
|
||||||
|
{
|
||||||
|
struct external_auth params;
|
||||||
|
|
||||||
|
os_memset(¶ms, 0, sizeof(params));
|
||||||
|
params.status = status;
|
||||||
|
os_memcpy(params.bssid, sta->addr, ETH_ALEN);
|
||||||
|
if (status == WLAN_STATUS_SUCCESS && sta->sae)
|
||||||
|
params.pmkid = sta->sae->pmkid;
|
||||||
|
|
||||||
|
hostapd_drv_send_external_auth_status(hapd, ¶ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta)
|
void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_VLAN
|
#ifndef CONFIG_NO_VLAN
|
||||||
|
@ -739,6 +754,7 @@ void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta)
|
||||||
sae_set_state(sta, SAE_ACCEPTED, "Accept Confirm");
|
sae_set_state(sta, SAE_ACCEPTED, "Accept Confirm");
|
||||||
wpa_auth_pmksa_add_sae(hapd->wpa_auth, sta->addr,
|
wpa_auth_pmksa_add_sae(hapd->wpa_auth, sta->addr,
|
||||||
sta->sae->pmk, sta->sae->pmkid);
|
sta->sae->pmk, sta->sae->pmkid);
|
||||||
|
sae_sme_send_external_auth_status(hapd, sta, WLAN_STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1220,6 +1236,7 @@ reply:
|
||||||
!data && end - pos >= 2)
|
!data && end - pos >= 2)
|
||||||
data = wpabuf_alloc_copy(pos, 2);
|
data = wpabuf_alloc_copy(pos, 2);
|
||||||
|
|
||||||
|
sae_sme_send_external_auth_status(hapd, sta, resp);
|
||||||
send_auth_reply(hapd, mgmt->sa, mgmt->bssid, WLAN_AUTH_SAE,
|
send_auth_reply(hapd, mgmt->sa, mgmt->bssid, WLAN_AUTH_SAE,
|
||||||
auth_transaction, resp,
|
auth_transaction, resp,
|
||||||
data ? wpabuf_head(data) : (u8 *) "",
|
data ? wpabuf_head(data) : (u8 *) "",
|
||||||
|
|
Loading…
Reference in a new issue