]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MBSSID: Fix Non-Inheritance element encoding
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 31 Oct 2023 13:51:30 +0000 (15:51 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 31 Oct 2023 13:51:30 +0000 (15:51 +0200)
The List of Element ID Extensions field is not an optional field, so
include it in the Non-Inheritance element with Length=0 to indicate that
there is no Element ID Extension List.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/ieee802_11.c

index 2defe6c917560da2ab1d0a9796b758e2c93c4fdb..a5e5e875c5016babcc621b2bb464c2edbfc56906 100644 (file)
@@ -7785,11 +7785,12 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
                        non_inherit_ie[ie_count++] = WLAN_EID_EXT_SUPP_RATES;
                if (ie_count) {
                        *eid++ = WLAN_EID_EXTENSION;
-                       *eid++ = 2 + ie_count;
+                       *eid++ = 2 + ie_count + 1;
                        *eid++ = WLAN_EID_EXT_NON_INHERITANCE;
                        *eid++ = ie_count;
                        os_memcpy(eid, non_inherit_ie, ie_count);
                        eid += ie_count;
+                       *eid++ = 0; /* No Element ID Extension List */
                }
 
                *eid_len_pos = (eid - eid_len_pos) - 1;