diff mbox

AP: Disable VHT in TKIP configuration

Message ID 1476715989-1251-1-git-send-email-filip.matusiak@tieto.com
State Accepted
Headers show

Commit Message

Filip Matusiak Oct. 17, 2016, 2:53 p.m. UTC
This has already been done for WEP, but there's same constraint for not
allowing VTH rates in case of TKIP.

Signed-off-by: Filip Matusiak <filip.matusiak@tieto.com>
---
 src/ap/ap_config.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Jouni Malinen Oct. 28, 2016, 10:30 p.m. UTC | #1
On Mon, Oct 17, 2016 at 04:53:09PM +0200, Filip Matusiak wrote:
> This has already been done for WEP, but there's same constraint for not
> allowing VTH rates in case of TKIP.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index 228de2b..9c178c7 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -848,6 +848,17 @@  static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
 		wpa_printf(MSG_ERROR,
 			   "VHT (IEEE 802.11ac) with WEP is not allowed, disabling VHT capabilities");
 	}
+
+	if (full_config && conf->ieee80211ac && bss->wpa &&
+	    !(bss->wpa_pairwise & WPA_CIPHER_CCMP) &&
+	    !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP |
+				   WPA_CIPHER_CCMP_256 | WPA_CIPHER_GCMP_256)))
+	{
+		bss->disable_11ac = 1;
+		wpa_printf(MSG_ERROR, "VHT (IEEE 802.11ac) with WPA/WPA2 "
+			   "requires CCMP/GCMP to be enabled, disabling VHT "
+			   "capabilities");
+	}
 #endif /* CONFIG_IEEE80211AC */
 
 #ifdef CONFIG_WPS