From: Jaehyun Kim Date: Tue, 7 May 2024 06:58:17 +0000 (+0900) Subject: Set security value appropriate in WPA3/WPA2 mode X-Git-Tag: accepted/tizen/unified/20240513.053357~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b2128425a5c4aedf997840828e47e7ef4a4ef32;p=platform%2Fupstream%2Fconnman.git Set security value appropriate in WPA3/WPA2 mode In mixed mode, check keymgmt_capa and set the security value appropriate for the supported type. Change-Id: I57c845f7b582b3f8fa0cb19513b4194ca075b4fc Signed-off-by: Jaehyun Kim --- diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 8329975..d0033ed 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -3240,6 +3240,7 @@ static void bss_compute_security(struct g_supplicant_bss *bss) #if defined TIZEN_EXT bss->ft_ieee8021x = FALSE; bss->ft_psk = FALSE; + GSupplicantInterface *interface = bss->interface; #endif #if defined TIZEN_EXT @@ -3293,9 +3294,14 @@ static void bss_compute_security(struct g_supplicant_bss *bss) #if defined TIZEN_EXT else if (bss->ft_ieee8021x) bss->security = G_SUPPLICANT_SECURITY_IEEE8021X; - else if (bss->sae) - bss->security = G_SUPPLICANT_SECURITY_SAE; - else if (bss->psk_sha256) + else if (bss->sae) { + if (!bss->psk) + bss->security = G_SUPPLICANT_SECURITY_SAE; + else if (interface->keymgmt_capa & G_SUPPLICANT_KEYMGMT_SAE) + bss->security = G_SUPPLICANT_SECURITY_SAE; + else + bss->security = G_SUPPLICANT_SECURITY_PSK; + } else if (bss->psk_sha256) bss->security = G_SUPPLICANT_SECURITY_PSK_SHA256; #endif else if (bss->psk)