mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
netdev: sae: owe: update to use new status codes
This commit is contained in:
parent
ffd8e81774
commit
e5e2922eee
@ -1857,7 +1857,7 @@ error:
|
|||||||
* response and will handle it.
|
* response and will handle it.
|
||||||
*/
|
*/
|
||||||
if (netdev->owe && *status_code ==
|
if (netdev->owe && *status_code ==
|
||||||
MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP)
|
MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
netdev_connect_failed(netdev, NETDEV_RESULT_ASSOCIATION_FAILED,
|
netdev_connect_failed(netdev, NETDEV_RESULT_ASSOCIATION_FAILED,
|
||||||
|
@ -244,7 +244,7 @@ void owe_rx_associate(struct owe_sm *owe, const uint8_t *frame, size_t len)
|
|||||||
|
|
||||||
body = mmpdu_body(mpdu);
|
body = mmpdu_body(mpdu);
|
||||||
|
|
||||||
if (body->status_code == MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
if (body->status_code == MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
||||||
/* retry with another group, if possible */
|
/* retry with another group, if possible */
|
||||||
owe->retry++;
|
owe->retry++;
|
||||||
|
|
||||||
|
14
src/sae.c
14
src/sae.c
@ -169,7 +169,7 @@ static void sae_reject_authentication(struct sae_sm *sm, uint16_t reason)
|
|||||||
l_put_u16(reason, ptr);
|
l_put_u16(reason, ptr);
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
|
|
||||||
if (reason == MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
if (reason == MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
||||||
l_put_u16(sm->group, ptr);
|
l_put_u16(sm->group, ptr);
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
}
|
}
|
||||||
@ -446,7 +446,7 @@ static void sae_process_commit(struct sae_sm *sm, const uint8_t *from,
|
|||||||
|
|
||||||
if (group != sm->group) {
|
if (group != sm->group) {
|
||||||
l_error("unsupported group: %u", group);
|
l_error("unsupported group: %u", group);
|
||||||
reason = MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP;
|
reason = MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP;
|
||||||
goto reject;
|
goto reject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,7 +678,7 @@ static bool sae_verify_nothing(struct sae_sm *sm, uint16_t transaction,
|
|||||||
/* reject with unsupported group */
|
/* reject with unsupported group */
|
||||||
if (l_get_le16(frame) != sm->group) {
|
if (l_get_le16(frame) != sm->group) {
|
||||||
sae_reject_authentication(sm,
|
sae_reject_authentication(sm,
|
||||||
MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP);
|
MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -735,10 +735,10 @@ static bool sae_verify_committed(struct sae_sm *sm, uint16_t transaction,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case MMPDU_REASON_CODE_ANTI_CLOGGING_TOKEN_REQ:
|
case MMPDU_STATUS_CODE_ANTI_CLOGGING_TOKEN_REQ:
|
||||||
sae_process_anti_clogging(sm, frame, len);
|
sae_process_anti_clogging(sm, frame, len);
|
||||||
return false;
|
return false;
|
||||||
case MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP:
|
case MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP:
|
||||||
/*
|
/*
|
||||||
* TODO: hostapd in its current state does not include the
|
* TODO: hostapd in its current state does not include the
|
||||||
* group number as it should. This is a violation of the spec,
|
* group number as it should. This is a violation of the spec,
|
||||||
@ -874,7 +874,7 @@ static bool sae_verify_committed(struct sae_sm *sm, uint16_t transaction,
|
|||||||
|
|
||||||
reject_unsupp_group:
|
reject_unsupp_group:
|
||||||
sae_reject_authentication(sm,
|
sae_reject_authentication(sm,
|
||||||
MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP);
|
MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1024,7 +1024,7 @@ void sae_rx_packet(struct sae_sm *sm, const uint8_t *from, const uint8_t *frame,
|
|||||||
* this missing group number.
|
* this missing group number.
|
||||||
*/
|
*/
|
||||||
if (len == 4 && status !=
|
if (len == 4 && status !=
|
||||||
MMPDU_REASON_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
|
||||||
sae_authentication_failed(sm, status);
|
sae_authentication_failed(sm, status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user