OWE: Rename owe_assoc_req_process() parameter reason to status
In the function owe_assoc_req_process(), values assigned to the reason argument imply that it should be renamed to status. Rename 'reason' to 'status' and modify the uses of owe_assoc_req_process() accordingly. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
This commit is contained in:
parent
0aeda4da1b
commit
e7d8842e6b
3 changed files with 12 additions and 12 deletions
|
@ -577,18 +577,18 @@ skip_wpa_check:
|
||||||
npos = owe_assoc_req_process(hapd, sta,
|
npos = owe_assoc_req_process(hapd, sta,
|
||||||
elems.owe_dh, elems.owe_dh_len,
|
elems.owe_dh, elems.owe_dh_len,
|
||||||
p, sizeof(buf) - (p - buf),
|
p, sizeof(buf) - (p - buf),
|
||||||
&reason);
|
&status);
|
||||||
if (npos)
|
if (npos)
|
||||||
p = npos;
|
p = npos;
|
||||||
|
|
||||||
if (!npos &&
|
if (!npos &&
|
||||||
reason == WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) {
|
status == WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) {
|
||||||
status = WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED;
|
|
||||||
hostapd_sta_assoc(hapd, addr, reassoc, status, buf,
|
hostapd_sta_assoc(hapd, addr, reassoc, status, buf,
|
||||||
p - buf);
|
p - buf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!npos || reason != WLAN_STATUS_SUCCESS)
|
if (!npos || status != WLAN_STATUS_SUCCESS)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_OWE */
|
#endif /* CONFIG_OWE */
|
||||||
|
|
|
@ -3951,12 +3951,12 @@ done:
|
||||||
#ifdef CONFIG_OWE
|
#ifdef CONFIG_OWE
|
||||||
u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
const u8 *owe_dh, u8 owe_dh_len,
|
const u8 *owe_dh, u8 owe_dh_len,
|
||||||
u8 *owe_buf, size_t owe_buf_len, u16 *reason)
|
u8 *owe_buf, size_t owe_buf_len, u16 *status)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
if (hapd->conf->own_ie_override) {
|
if (hapd->conf->own_ie_override) {
|
||||||
wpa_printf(MSG_DEBUG, "OWE: Using IE override");
|
wpa_printf(MSG_DEBUG, "OWE: Using IE override");
|
||||||
*reason = WLAN_STATUS_SUCCESS;
|
*status = WLAN_STATUS_SUCCESS;
|
||||||
return wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
return wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
||||||
owe_buf_len, NULL, 0);
|
owe_buf_len, NULL, 0);
|
||||||
}
|
}
|
||||||
|
@ -3966,18 +3966,18 @@ u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
wpa_printf(MSG_DEBUG, "OWE: Using PMKSA caching");
|
wpa_printf(MSG_DEBUG, "OWE: Using PMKSA caching");
|
||||||
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
||||||
owe_buf_len, NULL, 0);
|
owe_buf_len, NULL, 0);
|
||||||
*reason = WLAN_STATUS_SUCCESS;
|
*status = WLAN_STATUS_SUCCESS;
|
||||||
return owe_buf;
|
return owe_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sta->owe_pmk && sta->external_dh_updated) {
|
if (sta->owe_pmk && sta->external_dh_updated) {
|
||||||
wpa_printf(MSG_DEBUG, "OWE: Using previously derived PMK");
|
wpa_printf(MSG_DEBUG, "OWE: Using previously derived PMK");
|
||||||
*reason = WLAN_STATUS_SUCCESS;
|
*status = WLAN_STATUS_SUCCESS;
|
||||||
return owe_buf;
|
return owe_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
*reason = owe_process_assoc_req(hapd, sta, owe_dh, owe_dh_len);
|
*status = owe_process_assoc_req(hapd, sta, owe_dh, owe_dh_len);
|
||||||
if (*reason != WLAN_STATUS_SUCCESS)
|
if (*status != WLAN_STATUS_SUCCESS)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf,
|
||||||
|
@ -3988,7 +3988,7 @@ u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
|
|
||||||
pub = crypto_ecdh_get_pubkey(sta->owe_ecdh, 0);
|
pub = crypto_ecdh_get_pubkey(sta->owe_ecdh, 0);
|
||||||
if (!pub) {
|
if (!pub) {
|
||||||
*reason = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
*status = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||||
return owe_buf;
|
return owe_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ void ieee802_11_finish_fils_auth(struct hostapd_data *hapd,
|
||||||
const u8 *msk, size_t msk_len);
|
const u8 *msk, size_t msk_len);
|
||||||
u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
const u8 *owe_dh, u8 owe_dh_len,
|
const u8 *owe_dh, u8 owe_dh_len,
|
||||||
u8 *owe_buf, size_t owe_buf_len, u16 *reason);
|
u8 *owe_buf, size_t owe_buf_len, u16 *status);
|
||||||
u16 owe_process_rsn_ie(struct hostapd_data *hapd, struct sta_info *sta,
|
u16 owe_process_rsn_ie(struct hostapd_data *hapd, struct sta_info *sta,
|
||||||
const u8 *rsn_ie, size_t rsn_ie_len,
|
const u8 *rsn_ie, size_t rsn_ie_len,
|
||||||
const u8 *owe_dh, size_t owe_dh_len);
|
const u8 *owe_dh, size_t owe_dh_len);
|
||||||
|
|
Loading…
Reference in a new issue