commit e53bd179921692993adad0dbe98dac95fe51e94a
parent 85bd019c85f6fd4cb9eaad37ea2ffc8de07ea64d
Author: Denis Kenzior <denkenz@gmail.com>
Date: Thu, 23 May 2019 16:47:22 -0500
owe: Fix endianness issues
Using mmpdu_associate_response structure members marked __le requires
the relevant endianness conversion.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/owe.c b/src/owe.c
@@ -256,7 +256,8 @@ static int owe_rx_associate(struct auth_proto *ap, const uint8_t *frame,
body = mmpdu_body(mpdu);
- if (body->status_code == MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
+ if (L_LE16_TO_CPU(body->status_code) ==
+ MMPDU_STATUS_CODE_UNSUPP_FINITE_CYCLIC_GROUP) {
if (!owe_retry(owe))
goto owe_bad_status;
@@ -326,7 +327,7 @@ invalid_ies:
return MMPDU_STATUS_CODE_INVALID_ELEMENT;
owe_bad_status:
- return (int)body->status_code;
+ return L_LE16_TO_CPU(body->status_code);
}
struct auth_proto *owe_sm_new(struct handshake_state *hs,