]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Enable H2E on 6 GHz when SAE is used
authorNicolas Escande <nico.escande@gmail.com>
Tue, 29 Nov 2022 16:02:37 +0000 (17:02 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 29 Nov 2022 16:56:47 +0000 (18:56 +0200)
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 <nico.escande@gmail.com>
src/ap/ap_config.c

index be2e47122d4f635e3d924527570666844c76a01e..11324257acb410124f72e3cbd4488ae8d6b660c1 100644 (file)
@@ -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;
 }