ソースを参照

qcacld-3.0: Fix RSN not included in FILS connection

When the FILS erp keys are available, the RSN IE is
not included in the assoc request as the function
lim_update_fils_config() returns always if rrk_length is
non zero. Fix this to return only if malloc fails.

Also add additional debugs for RSN IE not included in FILS
authentication frame and remove call to
wlan_cm_update_mlme_fils_connection_info() from
update_profile_fils_info().

Change-Id: I75cc1b04c2fdcbf3e7c55dfac41254a2378233bb
CRs-Fixed: 2789793
Pragaspathi Thilagaraj 4 年 前
コミット
4822851798

+ 5 - 5
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -586,6 +586,7 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
 	}
 
 	if (!src_fils_info) {
+		mlme_debug("FILS: vdev:%d Clear fils info", vdev_id);
 		qdf_mem_free(mlme_priv->fils_con_info);
 		mlme_priv->fils_con_info = NULL;
 		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
@@ -602,6 +603,7 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
 		return QDF_STATUS_E_NOMEM;
 	}
 
+	mlme_debug("FILS: vdev:%d update fils info", vdev_id);
 	qdf_mem_copy(mlme_priv->fils_con_info, src_fils_info,
 		     sizeof(struct wlan_fils_connection_info));
 
@@ -616,6 +618,7 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
 {
 	struct wlan_objmgr_vdev *vdev;
 	struct mlme_legacy_priv *mlme_priv;
+	struct wlan_fils_connection_info *fils_info;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_MLME_NB_ID);
@@ -631,13 +634,10 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
 		return NULL;
 	}
 
-	if (!mlme_priv->fils_con_info) {
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-		return NULL;
-	}
+	fils_info = mlme_priv->fils_con_info;
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
 
-	return mlme_priv->fils_con_info;
+	return fils_info;
 }
 
 QDF_STATUS wlan_cm_update_fils_ft(struct wlan_objmgr_psoc *psoc,

+ 6 - 2
core/mac/src/pe/lim/lim_process_fils.c

@@ -1419,8 +1419,10 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
 
 	fils_info = wlan_cm_get_fils_connection_info(mac_ctx->psoc,
 						     session->vdev_id);
-	if (!fils_info)
+	if (!fils_info) {
+		pe_debug("FILS: CM Fils info is NULL");
 		return;
+	}
 
 	pe_fils_info = session->fils_info;
 	if (!pe_fils_info)
@@ -1457,9 +1459,10 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
 	if (fils_info->r_rk_length) {
 		pe_fils_info->fils_rrk =
 			qdf_mem_malloc(fils_info->r_rk_length);
-		if (!pe_fils_info->fils_rrk)
+		if (!pe_fils_info->fils_rrk) {
 			qdf_mem_free(pe_fils_info->keyname_nai_data);
 			return;
+		}
 
 		if (fils_info->r_rk_length <= WLAN_FILS_MAX_RRK_LENGTH)
 			qdf_mem_copy(pe_fils_info->fils_rrk,
@@ -1506,6 +1509,7 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
 		qdf_mem_copy(pe_fils_info->fils_pmk, fils_info->pmk,
 			     fils_info->pmk_len);
 	}
+
 	pe_debug("FILS: fils=%d nai-len=%d rrk_len=%d akm=%d auth=%d pmk_len=%d",
 		 fils_info->is_fils_connection,
 		 fils_info->key_nai_length,

+ 3 - 1
core/mac/src/pe/lim/lim_sme_req_utils.c

@@ -74,8 +74,10 @@ lim_is_rsn_ie_valid_in_sme_req_message(struct mac_context *mac_ctx,
 			       rsn_ie->length, privacy, val);
 	}
 
-	if (!rsn_ie->length)
+	if (!rsn_ie->length) {
+		pe_debug("RSN IE length is 0");
 		return true;
+	}
 
 	if ((rsn_ie->rsnIEdata[0] != DOT11F_EID_RSN)
 #ifdef FEATURE_WLAN_WAPI

+ 0 - 4
core/sme/src/csr/csr_api_roam.c

@@ -7874,10 +7874,6 @@ static void update_profile_fils_info(struct mac_context *mac,
 	qdf_mem_copy(des_profile->fils_con_info,
 			src_profile->fils_con_info,
 			sizeof(struct wlan_fils_connection_info));
-
-	wlan_cm_update_mlme_fils_connection_info(mac->psoc,
-						 des_profile->fils_con_info,
-						 vdev_id);
 	des_profile->hlp_ie =
 		qdf_mem_malloc(src_profile->hlp_ie_len);
 	if (!des_profile->hlp_ie)