qcacld-3.0: Check peer address before peer create

Check peer address for group or zero before peer create
as there is no way a MGMT frame can be sent to such
a peer, and it also may lead to peer leak in FW, if
this peer is created, as peer delete doesn't go for
such a peer.

Fix is to have a sanity check and then only allow
peer create in host and FW.

Change-Id: Ia7f9e870f10ff8fea5b03f01697370d05ca06668
CRs-Fixed: 2392771
This commit is contained in:
gaurank kathpalia
2019-01-31 22:27:14 +05:30
committed by nshrivas
parent 19f4af5b3a
commit 2e1aa99e00

View File

@@ -2030,6 +2030,12 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
goto err; goto err;
} }
if (qdf_is_macaddr_group((struct qdf_mac_addr *)peer_addr) ||
qdf_is_macaddr_zero((struct qdf_mac_addr *)peer_addr)) {
WMA_LOGE("Invalid peer address received reject it");
goto err;
}
/* /*
* Check if peer with same MAC exist on other Vdev, If so avoid * Check if peer with same MAC exist on other Vdev, If so avoid
* adding this peer, as it will cause FW to crash. * adding this peer, as it will cause FW to crash.