MBSSID: Fix Non-Inheritance element encoding

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>
This commit is contained in:
Jouni Malinen 2023-10-31 15:51:30 +02:00 committed by Jouni Malinen
parent 42add3c27b
commit 4bfc007b61

View 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; non_inherit_ie[ie_count++] = WLAN_EID_EXT_SUPP_RATES;
if (ie_count) { if (ie_count) {
*eid++ = WLAN_EID_EXTENSION; *eid++ = WLAN_EID_EXTENSION;
*eid++ = 2 + ie_count; *eid++ = 2 + ie_count + 1;
*eid++ = WLAN_EID_EXT_NON_INHERITANCE; *eid++ = WLAN_EID_EXT_NON_INHERITANCE;
*eid++ = ie_count; *eid++ = ie_count;
os_memcpy(eid, non_inherit_ie, ie_count); os_memcpy(eid, non_inherit_ie, ie_count);
eid += ie_count; eid += ie_count;
*eid++ = 0; /* No Element ID Extension List */
} }
*eid_len_pos = (eid - eid_len_pos) - 1; *eid_len_pos = (eid - eid_len_pos) - 1;