mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacmn: Enable peer authorize by default
Drop non-EAPOL frames from unauthorized peer in security mode. Enabling this feature by default with this change. Change-Id: I9878b37088149e34f456a38a9c0f722e4c5ee49a CRs-Fixed: 2943789
This commit is contained in:
parent
2433c03b06
commit
280df074ae
3 changed files with 21 additions and 0 deletions
|
|
@ -2899,6 +2899,23 @@ done:
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Drop non-EAPOL frames from unauthorized peer.
|
||||
*/
|
||||
if (qdf_likely(peer) && qdf_unlikely(!peer->authorize)) {
|
||||
bool is_eapol = qdf_nbuf_is_ipv4_eapol_pkt(nbuf) ||
|
||||
qdf_nbuf_is_ipv4_wapi_pkt(nbuf);
|
||||
|
||||
if (!is_eapol) {
|
||||
DP_STATS_INC(soc,
|
||||
rx.err.peer_unauth_rx_pkt_drop,
|
||||
1);
|
||||
qdf_nbuf_free(nbuf);
|
||||
nbuf = next;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (soc->process_rx_status)
|
||||
dp_rx_cksum_offload(vdev->pdev, nbuf, rx_tlv_hdr);
|
||||
|
||||
|
|
|
|||
|
|
@ -6560,6 +6560,8 @@ dp_print_soc_rx_stats(struct dp_soc *soc)
|
|||
soc->stats.rx.err.defrag_peer_uninit);
|
||||
DP_PRINT_STATS("Pkts delivered no peer = %d",
|
||||
soc->stats.rx.err.pkt_delivered_no_peer);
|
||||
DP_PRINT_STATS("Pkts drop due to no peer auth :%d",
|
||||
soc->stats.rx.err.peer_unauth_rx_pkt_drop);
|
||||
DP_PRINT_STATS("Invalid Pdev = %d",
|
||||
soc->stats.rx.err.invalid_pdev);
|
||||
DP_PRINT_STATS("Invalid Peer = %d",
|
||||
|
|
|
|||
|
|
@ -1010,6 +1010,8 @@ struct dp_soc_stats {
|
|||
uint32_t bar_handle_fail_count;
|
||||
/* EAPOL drop count in intrabss scenario */
|
||||
uint32_t intrabss_eapol_drop;
|
||||
/* Non Eapol pkt drop cnt due to peer not authorized */
|
||||
uint32_t peer_unauth_rx_pkt_drop;
|
||||
} err;
|
||||
|
||||
/* packet count per core - per ring */
|
||||
|
|
|
|||
Loading…
Reference in a new issue