]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix AP config check to recognize all PSK AKMs
authorJouni Malinen <j@w1.fi>
Sat, 2 Apr 2022 10:16:18 +0000 (13:16 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 2 Apr 2022 13:26:02 +0000 (16:26 +0300)
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 <j@w1.fi>
src/ap/ap_config.c

index 5bfd9e9f52bbdc184813ad82f9768b1ba1cd9b37..efbb87b9f309d702b4e5f49b2266865347e9f3f8 100644 (file)
@@ -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 ||