From 532d6ae75f8d4c120e08ee74e2d974190926d10d Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Tue, 11 May 2021 17:55:31 +0530 Subject: [PATCH] qcacmn: Do not drop the beacon in case of RSN len is less than 2 For security cert TC, RSNIE length can be 1 but if the beacon is dropped, old entry will remain in scan cache and cause cert TC failure as connection with old entry with valid RSN IE will pass. So instead of dropping the frame, do not store the RSN pointer so that old entry is overwritten. Change-Id: I2fe4d2dd2352be6850f7a18a2ec829733ded7ee8 CRs-Fixed: 2944120 --- umac/scan/dispatcher/src/wlan_scan_utils_api.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c index 347fb78671..f6d8ae3829 100644 --- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c @@ -1163,9 +1163,16 @@ util_scan_populate_bcn_ie_list(struct wlan_objmgr_pdev *pdev, (uint8_t *)&(((struct htcap_ie *)ie)->ie); break; case WLAN_ELEMID_RSN: - if (ie->ie_len < WLAN_RSN_IE_MIN_LEN) - goto err; - scan_params->ie_list.rsn = (uint8_t *)ie; + /* + * For security cert TC, RSNIE length can be 1 but if + * beacon is dropped, old entry will remain in scan + * cache and cause cert TC failure as connection with + * old entry with valid RSN IE will pass. + * So instead of dropping the frame, do not store the + * RSN pointer so that old entry is overwritten. + */ + if (ie->ie_len >= WLAN_RSN_IE_MIN_LEN) + scan_params->ie_list.rsn = (uint8_t *)ie; break; case WLAN_ELEMID_XRATES: if (ie->ie_len > WLAN_EXT_SUPPORTED_RATES_IE_MAX_LEN)