]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD: Fix MLE parsing in for association on big-endian CPUs
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:15:27 +0000 (11:15 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:15:27 +0000 (11:15 +0200)
The control variable is ANDed with ml_control in host byte order and as
such, the control variable should have been initialized without
conversion to little endian.

Fixes: 5af986c75af4 ("MLD: Also mark links as failed after association failure")
Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/events.c

index ec29deae1bb2520beb7824014698d64ce3247fb1..89d4036ae8fc6e15dd966440f96976e24062699c 100644 (file)
@@ -3929,10 +3929,9 @@ static unsigned int wpas_ml_parse_assoc(struct wpa_supplicant *wpa_s,
        struct eht_ml_basic_common_info *common_info;
        const u8 *pos;
        u16 eml_capa = 0, mld_capa = 0;
-       const u16 control =
-               host_to_le16(MULTI_LINK_CONTROL_TYPE_BASIC |
-                            BASIC_MULTI_LINK_CTRL_PRES_LINK_ID |
-                            BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT);
+       const u16 control = MULTI_LINK_CONTROL_TYPE_BASIC |
+               BASIC_MULTI_LINK_CTRL_PRES_LINK_ID |
+               BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT;
        u8 expected_common_info_len = 9;
        unsigned int i = 0;
        u16 ml_control;