[PATCH] Only allow OWE and SAE H2E on 6 Ghz

Zhao Chen zhao.chen at mediatek.com
Fri Sep 23 00:15:50 PDT 2022


If the Bss is on 6 Gzh band, only allow OWE and SAE H2E to pass bss
check

Signed-off-by: Zhao Chen <zhao.chen at mediatek.com>
---
 wpa_supplicant/events.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e0a97bc2e..5bf1520df 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1403,6 +1403,22 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
 	}
 #endif /* CONFIG_SAE */
 
+	/* Only OWE and SAE H2E are allowed for 6 GHz. */
+	if(is_6ghz_freq(bss->freq))
+	{
+		if (!(ssid->key_mgmt & WPA_KEY_MGMT_OWE)
+#ifdef CONFIG_SAE
+			&& !(wpa_key_mgmt_sae(ssid->key_mgmt)
+			&& (rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_H2E)))
+#endif /* CONFIG_SAE */
+		) {
+			if (debug_print)
+				wpa_dbg(wpa_s, MSG_DEBUG,
+					"	skip - 6 Ghz AP but not OWE and not SAE H2E");
+			return false;
+		}
+	}
+
 #ifdef CONFIG_SAE_PK
 	if (ssid->sae_pk == SAE_PK_MODE_ONLY &&
 	    !(rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_PK))) {
-- 
2.25.1




More information about the Hostap mailing list