From 20bfd4feb3935a562e0c9de73cc9c8f1facec25c Mon Sep 17 00:00:00 2001 From: Nicolas Escande Date: Tue, 29 Nov 2022 17:02:37 +0100 Subject: [PATCH] AP: Enable H2E on 6 GHz when SAE is used Even if the use of H2E isn't strictly mandatory when using SAE on 6 GHz, WPA3-Personal pushes it on 6 GHz. So lets automatically enable it by setting sae_pwe=2. This will allow both the hunting-and-pecking and hash-to-element to work (and be backward compatible). Signed-off-by: Nicolas Escande --- src/ap/ap_config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index be2e47122..11324257a 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -1210,6 +1210,13 @@ static bool hostapd_config_check_bss_6g(struct hostapd_bss_config *bss) return false; } +#ifdef CONFIG_SAE + if (wpa_key_mgmt_sae(bss->wpa_key_mgmt) && !bss->sae_pwe) { + wpa_printf(MSG_INFO, "SAE: Enabling SAE H2E on 6 GHz"); + bss->sae_pwe = 2; + } +#endif /* CONFIG_SAE */ + return true; }