瀏覽代碼

qcacld-3.0: Failure in stats_get_station when MAC is all zeros

Currently __wlan_hdd_cfg80211_get_station gives failure when
incorrect MAC is received.
To address this issue add validity check for mac.

CRs-Fixed: 3239854
Change-Id: I9ecbcbc7681b839d29b31748c63d445da546ff09
Asutosh Mohapatra 2 年之前
父節點
當前提交
52f5a29062
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      core/hdd/src/wlan_hdd_stats.c

+ 8 - 0
core/hdd/src/wlan_hdd_stats.c

@@ -6259,6 +6259,14 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
 
 	if (wlan_hdd_validate_vdev_id(adapter->vdev_id))
 		return -EINVAL;
+	if (!mac) {
+		hdd_err("Received NULL mac address");
+		return -EINVAL;
+	}
+	if (qdf_is_macaddr_zero((struct qdf_mac_addr *)mac)) {
+		hdd_err("MAC is all zero");
+		return -EINVAL;
+	}
 
 	if (adapter->device_mode == QDF_SAP_MODE ||
 	    adapter->device_mode == QDF_P2P_GO_MODE) {