qcacld-2.0: Fix 80211 frame subtype value in DoS attacks check
The subtype values used in the DoS attacks check are not correct. No MGMT frame will be dropped in a DoS attack. Change-Id: I0fdcffd7151a78abf21bb0f4223aaba3e86a46ab CRs-Fixed: 2103880
This commit is contained in:
parent
8262069aee
commit
ac2156d3ba
|
@ -500,7 +500,7 @@ static bool tlshim_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
|
||||
peer = ol_txrx_find_peer_by_addr(pdev_ctx, peer_addr, &peer_id);
|
||||
if (!peer) {
|
||||
if (SIR_MAC_MGMT_ASSOC_REQ != subtype) {
|
||||
if (IEEE80211_FC0_SUBTYPE_ASSOC_REQ != subtype) {
|
||||
TLSHIM_LOGE(FL("Received mgmt frame: %0x from unknow peer: %pM"),
|
||||
subtype, peer_addr);
|
||||
should_drop = TRUE;
|
||||
|
@ -509,7 +509,7 @@ static bool tlshim_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
}
|
||||
|
||||
switch (subtype) {
|
||||
case SIR_MAC_MGMT_ASSOC_REQ:
|
||||
case IEEE80211_FC0_SUBTYPE_ASSOC_REQ:
|
||||
if (peer->last_assoc_rcvd) {
|
||||
if (adf_os_gettimestamp() - peer->last_assoc_rcvd <
|
||||
TLSHIM_MGMT_FRAME_DETECT_DOS_TIMER) {
|
||||
|
@ -519,7 +519,7 @@ static bool tlshim_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
}
|
||||
peer->last_assoc_rcvd = adf_os_gettimestamp();
|
||||
break;
|
||||
case SIR_MAC_MGMT_DISASSOC:
|
||||
case IEEE80211_FC0_SUBTYPE_DISASSOC:
|
||||
if (peer->last_disassoc_rcvd) {
|
||||
if (adf_os_gettimestamp() -
|
||||
peer->last_disassoc_rcvd <
|
||||
|
@ -530,7 +530,7 @@ static bool tlshim_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
}
|
||||
peer->last_disassoc_rcvd = adf_os_gettimestamp();
|
||||
break;
|
||||
case SIR_MAC_MGMT_DEAUTH:
|
||||
case IEEE80211_FC0_SUBTYPE_DEAUTH:
|
||||
if (peer->last_deauth_rcvd) {
|
||||
if (adf_os_gettimestamp() -
|
||||
peer->last_deauth_rcvd <
|
||||
|
|
Loading…
Reference in New Issue