Browse Source

qcacld-3.0: Fix wrong reason code for RSN/WPA in Association Response

The status code is set to 0(SUCCESS) in Association Response but
there is not RSN IE or WPA IE presented in the Association Request
of STA.

Change to send the Association Response with status code 0x0D(
Responding STA does not support the specified authentication
algorithm) to deny this Association Request.

Change-Id: If2a0a59c6b4986b54a12d4bdc7372c38317b6ce2
CRs-Fixed: 3625499
Ke Huang 1 year ago
parent
commit
4cea4a979d
1 changed files with 9 additions and 0 deletions
  1. 9 0
      core/mac/src/pe/lim/lim_process_assoc_req_frame.c

+ 9 - 0
core/mac/src/pe/lim/lim_process_assoc_req_frame.c

@@ -1150,6 +1150,15 @@ static bool lim_check_wpa_rsn_ie(struct pe_session *session,
 		}
 		*akm_type = lim_translate_rsn_oui_to_akm_type(
 						  dot11f_ie_wpa.auth_suites[0]);
+	} else {
+		if (session->gStartBssRSNIe.present ||
+		    session->gStartBssWPAIe.present) {
+			pe_warn("STA does not support RSN and WPA!");
+			lim_send_assoc_rsp_mgmt_frame(
+				mac_ctx, STATUS_NOT_SUPPORTED_AUTH_ALG, 1,
+				sa, sub_type, 0, session, false);
+			return false;
+		}
 	}
 
 	return true;