diff options
| author | Dhanashri Atre <datre@qca.qualcomm.com> | 2013-06-13 11:47:57 -0700 |
|---|---|---|
| committer | Madan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com> | 2013-11-14 19:57:13 -0800 |
| commit | d8d5563b3ae488f7a875134517bea8ed4dca89e0 (patch) | |
| tree | 3e4c1ddfe47f398ac521d3f9c255335b3c4e289d | |
| parent | a4c164ce0484b8f345863297eace2e18c34b9a6f (diff) | |
cld: Fix for PMK Cache
Fix to address PMK cache corruption when the supplicant does not provide
a BSSID in the connect request
Change-Id: Ic056f9a0dedeeaa6f20ab469a8991bafd61f5273
CRs-Fixed: 553806
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 20 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 4 |
2 files changed, 17 insertions, 7 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index ca05c7967cd0..db6eb2d97835 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -2716,6 +2716,7 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter, tANI_U8 *pRsnIe; tANI_U16 RSNIeLen; tPmkidCacheInfo PMKIDCache[4]; // Local transfer memory + v_BOOL_t updatePMKCache = FALSE; /* Clear struct of tDot11fIERSN and tDot11fIEWPA specifically setting present flag to 0 */ @@ -2768,10 +2769,11 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter, { break; } - if ( hdd_IsMACAddrNULL( (u_char *) pBssid , sizeof( (char *) pBssid))) + if ( hdd_IsMACAddrNULL( (u_char *) pBssid->ether_addr_octet , 6)) { break; } + updatePMKCache = TRUE; // For right now, I assume setASSOCIATE() has passed in the bssid. vos_mem_copy(PMKIDCache[i].BSSID, pBssid, ETHER_ADDR_LEN); @@ -2779,13 +2781,17 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter, dot11RSNIE.pmkid[i], CSR_RSN_PMKID_SIZE); } - // Calling csrRoamSetPMKIDCache to configure the PMKIDs into the cache - hddLog(LOG1, FL("%s: Calling csrRoamSetPMKIDCache with cache entry %ld."), + + if (updatePMKCache) + { + // Calling csrRoamSetPMKIDCache to configure the PMKIDs into the cache + hddLog(LOG1, FL("%s: Calling csrRoamSetPMKIDCache with cache entry %ld."), __func__, i ); - // Finally set the PMKSA ID Cache in CSR - result = sme_RoamSetPMKIDCache(halHandle,pAdapter->sessionId, - PMKIDCache, - dot11RSNIE.pmkid_count ); + // Finally set the PMKSA ID Cache in CSR + result = sme_RoamSetPMKIDCache(halHandle,pAdapter->sessionId, + PMKIDCache, + dot11RSNIE.pmkid_count ); + } } else if (gen_ie[0] == DOT11F_EID_WPA) { diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 584551030743..551e19539a88 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -4837,6 +4837,10 @@ int wlan_hdd_cfg80211_connect_start( hdd_adapter_t *pAdapter, vos_mem_copy((void *)(pWextState->req_bssId), bssid, WNI_CFG_BSSID_LEN); } + else + { + vos_mem_zero((void *)(pRoamProfile->BSSIDs.bssid),WNI_CFG_BSSID_LEN); + } if ((IW_AUTH_WPA_VERSION_WPA == pWextState->wpaVersion) || (IW_AUTH_WPA_VERSION_WPA2 == pWextState->wpaVersion)) |
