diff options
| author | Yeshwanth Sriram Guntuka <ysriramg@codeaurora.org> | 2021-02-27 01:07:29 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-05-21 00:48:00 -0700 |
| commit | c95b6fbdb7970d33fb4102e62d5bf5cd855c150c (patch) | |
| tree | 276d03c563d66f3edcab295bbe55a9f433b1d81e | |
| parent | 081cea2bfb2a096d9da1e401c042cc332b6f5b70 (diff) | |
qcacld-3.0: Drop EAPOL frame with DA different from SAP vdev mac addr
Fragmented EAPOL frames and EAPOL frames received
in few error scenarios with DA different from SAP
vdev mac addr will be dropped.
Change-Id: I624eba5bdb43c6b88a1f57112550f8026cc35e24
CRs-Fixed: 2888227
| -rw-r--r-- | core/hdd/src/wlan_hdd_softap_tx_rx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index c66a8ab5b65b..92fe1d522878 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -910,6 +910,13 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) hdd_dhcp_indication(pAdapter, staid, skb, QDF_RX); + if (qdf_unlikely(qdf_nbuf_is_ipv4_eapol_pkt(skb) && + qdf_mem_cmp(qdf_nbuf_data(skb) + + QDF_NBUF_DEST_MAC_OFFSET, + pAdapter->macAddressCurrent.bytes, + QDF_MAC_ADDR_SIZE))) + return QDF_STATUS_E_FAILURE; + hdd_event_eapol_log(skb, QDF_RX); qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_RX); DPTRACE(qdf_dp_trace(skb, |
