]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Check a STA is HT before copying VHT capabilities
authorPablo Martin-Gomez <pmartin-gomez@freebox.fr>
Wed, 11 Jun 2025 18:38:06 +0000 (20:38 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 29 Sep 2025 10:55:01 +0000 (13:55 +0300)
A VHT STA is a HT STA. If a VHT STA has an invalid HT Capabilities
element, the HT capability of the STA is deactivated but the VHT
capability is still activated and the element copied.

Deactivate the VHT capability of a STA if it is not a HT STA.

Signed-off-by: Pablo Martin-Gomez <pmartin-gomez@freebox.fr>
src/ap/ieee802_11_vht.c

index df5f8cf765c1947caa14d29b1dc7469bfefae633..7415635bf39947a7a44565088000e330f5fa38f5 100644 (file)
@@ -190,7 +190,8 @@ u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
        /* Disable VHT caps for STAs associated to no-VHT BSSes. */
        if (!vht_capab || !(sta->flags & WLAN_STA_WMM) ||
            !hapd->iconf->ieee80211ac || hapd->conf->disable_11ac ||
-           !check_valid_vht_mcs(hapd->iface->current_mode, vht_capab)) {
+           !check_valid_vht_mcs(hapd->iface->current_mode, vht_capab) ||
+           !(sta->flags & WLAN_STA_HT)) {
                sta->flags &= ~WLAN_STA_VHT;
                os_free(sta->vht_capabilities);
                sta->vht_capabilities = NULL;