SAE: Rename state variables to match IEEE 802.11 standard
The enum values for struct sae_data::state now match the protocol instance states as defined in IEEE Std 802.11-2012, 11.3.8.2.2 Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
47b55a3ef5
commit
dd43026a19
3 changed files with 12 additions and 7 deletions
|
@ -376,6 +376,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
sta->sae = os_zalloc(sizeof(*sta->sae));
|
||||
if (sta->sae == NULL)
|
||||
return;
|
||||
sta->sae->state = SAE_NOTHING;
|
||||
}
|
||||
|
||||
if (auth_transaction == 1) {
|
||||
|
@ -386,13 +387,14 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
((const u8 *) mgmt) + len -
|
||||
mgmt->u.auth.variable);
|
||||
if (resp == WLAN_STATUS_SUCCESS) {
|
||||
sta->sae->state = SAE_COMMIT;
|
||||
data = auth_process_sae_commit(hapd, sta);
|
||||
if (data == NULL)
|
||||
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
else
|
||||
sta->sae->state = SAE_COMMITTED;
|
||||
}
|
||||
} else if (auth_transaction == 2) {
|
||||
if (sta->sae->state != SAE_COMMIT) {
|
||||
if (sta->sae->state != SAE_COMMITTED) {
|
||||
hostapd_logger(hapd, sta->addr,
|
||||
HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_DEBUG,
|
||||
|
@ -416,6 +418,8 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
data = auth_build_sae_confirm(hapd, sta);
|
||||
if (data == NULL)
|
||||
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
else
|
||||
sta->sae->state = SAE_ACCEPTED;
|
||||
}
|
||||
} else {
|
||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define SAE_CONFIRM_MAX_LEN (2 + 32)
|
||||
|
||||
struct sae_data {
|
||||
enum { SAE_INIT, SAE_COMMIT, SAE_CONFIRM } state;
|
||||
enum { SAE_NOTHING, SAE_COMMITTED, SAE_CONFIRMED, SAE_ACCEPTED } state;
|
||||
u16 send_confirm;
|
||||
u8 kck[32];
|
||||
u8 pmk[32];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue