]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MBSSID: Check xrates_supported for all BSSs explicitly
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 31 Oct 2023 13:52:42 +0000 (15:52 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 31 Oct 2023 13:52:42 +0000 (15:52 +0200)
This is needed to avoid generating an nontransmitted BSS profile that
would claim the Extended Rates element to be non-inherited.

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

index 1d3b96ac79a50943d3f07c7ba14be830578de45c..62cbf20ca34abb70bc143f56a67c66018ab69324 100644 (file)
@@ -471,6 +471,7 @@ ieee802_11_build_ap_params_mbssid(struct hostapd_data *hapd,
        size_t len, rnr_len = 0;
        u8 elem_count = 0, *elem = NULL, **elem_offset = NULL, *end;
        u8 rnr_elem_count = 0, *rnr_elem = NULL, **rnr_elem_offset = NULL;
+       size_t i;
 
        if (!iface->mbssid_max_interfaces ||
            iface->num_bss > iface->mbssid_max_interfaces ||
@@ -478,6 +479,14 @@ ieee802_11_build_ap_params_mbssid(struct hostapd_data *hapd,
             !iface->ema_max_periodicity))
                goto fail;
 
+       /* Make sure bss->xrates_supported is set for all BSSs to know whether
+        * it need to be non-inherited. */
+       for (i = 0; i < iface->num_bss; i++) {
+               u8 buf[100];
+
+               hostapd_eid_ext_supp_rates(iface->bss[i], buf);
+       }
+
        tx_bss = hostapd_mbssid_get_tx_bss(hapd);
        len = hostapd_eid_mbssid_len(tx_bss, WLAN_FC_STYPE_BEACON, &elem_count,
                                     NULL, 0, &rnr_len);