From ab3e679ae59db175ce6012388dfbe7985e9a16b0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 31 Oct 2023 15:52:42 +0200 Subject: [PATCH] MBSSID: Check xrates_supported for all BSSs explicitly 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 --- src/ap/beacon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 1d3b96ac7..62cbf20ca 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -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);