]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MSCS: Fix MSCS Response frame Status field parsing
authorJouni Malinen <j@w1.fi>
Mon, 22 Mar 2021 22:30:49 +0000 (00:30 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 22 Mar 2021 22:42:06 +0000 (00:42 +0200)
This is a 2 octet field, so need to use WPA_GET_LE16() here instead of
using only the first octet of the value.

Fixes: bbd3178af45b ("MSCS: Add support to process MSCS Response frames")
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/robust_av.c

index f6da56eeda9b458b46f21571f80f9f1e891cbc5c..39d282f0870d37bdf9b096b1fa79267042da48f7 100644 (file)
@@ -118,7 +118,7 @@ void wpas_handle_robust_av_recv_action(struct wpa_supplicant *wpa_s,
                return;
        }
 
-       status_code = *buf;
+       status_code = WPA_GET_LE16(buf);
        wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_MSCS_RESULT "bssid=" MACSTR
                " status_code=%u", MAC2STR(src), status_code);
        wpa_s->mscs_setup_done = status_code == WLAN_STATUS_SUCCESS;