diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c index 783f35383a0f..71e24d967185 100644 --- a/core/mac/src/dph/dph_hash_table.c +++ b/core/mac/src/dph/dph_hash_table.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -198,6 +199,7 @@ tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr, sta->is_disassoc_deauth_in_progress = 0; sta->sta_deletion_in_progress = false; sta->valid = 1; + sta->is_key_installed = 0; return sta; } diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c index 607555e8c5e2..15a733a5c762 100644 --- a/core/mac/src/pe/lim/lim_process_auth_frame.c +++ b/core/mac/src/pe/lim/lim_process_auth_frame.c @@ -1332,6 +1332,14 @@ lim_process_auth_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, return; } + /* Duplicate Auth frame from peer */ + auth_node = lim_search_pre_auth_list(mac_ctx, mac_hdr->sa); + if (auth_node && (auth_node->seq_num == curr_seq_num)) { + pe_err("Received an already processed auth frame with seq_num : %d", + curr_seq_num); + return; + } + /* save seq number and mac_addr in pe_session */ pe_session->prev_auth_seq_num = curr_seq_num; qdf_mem_copy(pe_session->prev_auth_mac_addr, mac_hdr->sa, ETH_ALEN); @@ -1463,7 +1471,6 @@ lim_process_auth_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, * Authentication frame3 and there is a context for requesting * STA. If not, reject with unspecified failure status code */ - auth_node = lim_search_pre_auth_list(mac_ctx, mac_hdr->sa); if (!auth_node) { pe_err("rx Auth frame with no preauth ctx with WEP bit set " QDF_MAC_ADDR_FMT,