]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Restrict Vendor VHT to 2.4 GHz only
authorRajkumar Manoharan <rmanohar@codeaurora.org>
Tue, 2 Jun 2020 06:14:27 +0000 (23:14 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 10 Jun 2020 18:30:50 +0000 (21:30 +0300)
Vendor VHT IE is used only on the 2.4 GHz band. Restrict the use of
vendor VHT element to 2.4 GHz. This will ensure that invalid/wrong user
configuration will not impact beacon data in other than the 2.4 GHz
band.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
src/ap/ieee802_11_vht.c

index f50f142dc0bbbdea8e70d8bdd11f654e9111bd9a..425b192e1379bf362268a74ded1c304b09870379 100644 (file)
@@ -425,7 +425,9 @@ u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid)
 {
        u8 *pos = eid;
 
-       if (!hapd->iface->current_mode)
+       /* Vendor VHT is applicable only to 2.4 GHz */
+       if (!hapd->iface->current_mode ||
+           hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
                return eid;
 
        *pos++ = WLAN_EID_VENDOR_SPECIFIC;