Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 280df074 authored by Yeshwanth Sriram Guntuka's avatar Yeshwanth Sriram Guntuka Committed by Madan Koyyalamudi
Browse files

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
parent 2433c03b
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2899,6 +2899,23 @@ uint32_t dp_rx_process(struct dp_intr *int_ctx, hal_ring_handle_t hal_ring_hdl,
			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);

+2 −0
Original line number Diff line number Diff line
@@ -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",
+2 −0
Original line number Diff line number Diff line
@@ -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 */