소스 검색

qcacmn: Allow PMKID only entries also to pmksa cache

In SAP case, external authentication(offloaded SAE authentication
to userspace) status event carries only PMKID to allow/disallow
peers to do PMKID+open auth based connection once the peers are
already SAE authenticated.
A check is added on the PMK length with the below change,
change: Ic41c2044e70f8d375130ef9e0af9fe4b83027c26. It rejects the
PMKID update to the pmk cache if the PMK length is 0. It's not
allowing to cache PMKID derived as part of SAE authentication.

There is no need to cache the PMK in SAE case as it won't be
used internally by driver or won't even be sent to firmware.
So, don't add any check and allow PMKID only entries also to
facilitate PMK caching mechanism in SAE SAP.

Change-Id: Ibd72975e91d93af9665c392b4e7a708a5f9c336a
CRs-Fixed: 2967752
Srinivas Dasari 4 년 전
부모
커밋
1db04afdb1
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      umac/cmn_services/crypto/src/wlan_crypto_global_api.c

+ 2 - 6
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -485,13 +485,9 @@ QDF_STATUS wlan_crypto_set_del_pmksa(struct wlan_objmgr_vdev *vdev,
 
 	crypto_params = &crypto_priv->crypto_params;
 	if (set) {
-		if (!pmksa->pmk_len || pmksa->pmk_len > MAX_PMK_LEN) {
-			crypto_err("Invalid PMK length");
-			return QDF_STATUS_E_FAILURE;
-		}
-
 		pmkid_cache = wlan_crypto_get_pmksa(vdev, &pmksa->bssid);
-		if (pmkid_cache && (!qdf_mem_cmp(pmkid_cache->pmk, pmksa->pmk,
+		if (pmkid_cache && ((pmksa->pmk_len == pmkid_cache->pmk_len) &&
+				    !qdf_mem_cmp(pmkid_cache->pmk, pmksa->pmk,
 						 pmksa->pmk_len))) {
 			crypto_debug("PMKSA entry found with same PMK");
 			pmkid_cache = NULL;