diff options
author | Yeshwanth Sriram Guntuka <ysriramg@codeaurora.org> | 2021-02-23 14:46:11 +0530 |
---|---|---|
committer | Isaac Chiou <isaacchiou@google.com> | 2021-03-19 10:21:48 +0000 |
commit | 6e140b44e116a6b2f8ed46d7f50d055ab83674e7 (patch) | |
tree | a80bea817634cd916ca359c73bb8b760e696b2d6 | |
parent | 1c7fecd88d8a6818d0ef7101419eedcf844b37c0 (diff) | |
download | qcacld-6e140b44e116a6b2f8ed46d7f50d055ab83674e7.tar.gz |
qcacld-3.0: Flush frags for peer on add key request
Fragments are not flushed as part of rekey which
could result in fragments encrypted under different
keys to be reassembled.
Fix is to flush fragments for the peer for which add
key request is received.
Bug: 182958222
Change-Id: I0c018ff7375272125c62aaea7b8ad4df9e842508
CRs-Fixed: 2875950
-rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 5ccd7d5892..ce7b21953c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 2020-2021 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -15302,6 +15302,12 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, QDF_STATUS qdf_ret_status; hdd_context_t *pHddCtx; hdd_ap_ctx_t *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter); + ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX); + + if (!pdev) { + hdd_err("DP pdev is NULL"); + return -EINVAL; + } ENTER(); @@ -15465,6 +15471,10 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, setKey.keyDirection = eSIR_TX_RX; qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); } + + ol_txrx_peer_flush_frags(pdev, pAdapter->sessionId, + setKey.peerMac.bytes); + if ((QDF_IBSS_MODE == pAdapter->device_mode) && !pairwise) { /* if a key is already installed, block all subsequent ones */ if (pAdapter->sessionCtx.station.ibss_enc_key_installed) { |