From 5b5c954c04f59fbca1e358c57bb83bdfcd76c40c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 2 Apr 2022 13:16:18 +0300 Subject: [PATCH] Fix AP config check to recognize all PSK AKMs The check for PSK/passphrase not being present was considering only the WPA-PSK AKM, but the same check should be applied for all other AKMs that can use a PSK. Signed-off-by: Jouni Malinen --- src/ap/ap_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 5bfd9e9f5..efbb87b9f 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -1249,7 +1249,8 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, return -1; } - if (full_config && bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) && + if (full_config && bss->wpa && + wpa_key_mgmt_wpa_psk_no_sae(bss->wpa_key_mgmt) && bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL && bss->ssid.wpa_psk_file == NULL && (bss->wpa_psk_radius != PSK_RADIUS_REQUIRED ||