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

Commit c585956b authored by Ahmad Masri's avatar Ahmad Masri Committed by Gerrit - the friendly Code Review server
Browse files

wil6210: AP should not forward eapol packets



In AP mode, the driver checks each received frame, in case it is
multicast or unicast packet targeted to one of the AP clients, the
driver does the routing in L2 level. EAPOL packet is plaintext frame
and it should not follow the above role.

When AP receives an EAPOL packet that is multicast or targeted to
a client in the AP network, the driver should not forward this packet
immediately in L2. EAPOL packet should be indicated to the network
stack which will check the packet validity and will decide if to forward
the packet to its client or not.

Change-Id: I0edf339c3be5a2300e7b8168866286e71045c0d5
Signed-off-by: default avatarAhmad Masri <amasri@codeaurora.org>
parent a57b056a
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: ISC
// SPDX-License-Identifier: ISC
/*
/*
 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/etherdevice.h>
#include <linux/etherdevice.h>
@@ -935,7 +935,9 @@ void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
			dev_kfree_skb(skb);
			dev_kfree_skb(skb);
			goto stats;
			goto stats;
		}
		}
	} else if (wdev->iftype == NL80211_IFTYPE_AP && !vif->ap_isolate) {
	} else if (wdev->iftype == NL80211_IFTYPE_AP && !vif->ap_isolate &&
		   /* pass EAPOL packets to local net stack only */
		   (wil_skb_get_protocol(skb) != htons(ETH_P_PAE))) {
		if (mcast) {
		if (mcast) {
			/* send multicast frames both to higher layers in
			/* send multicast frames both to higher layers in
			 * local net stack and back to the wireless medium
			 * local net stack and back to the wireless medium
+8 −1
Original line number Original line Diff line number Diff line
/* SPDX-License-Identifier: ISC */
/* SPDX-License-Identifier: ISC */
/*
/*
 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
 */
 */


#ifndef WIL6210_TXRX_H
#ifndef WIL6210_TXRX_H
@@ -625,6 +625,13 @@ static inline u8 *wil_skb_get_sa(struct sk_buff *skb)
	return eth->h_source;
	return eth->h_source;
}
}


static inline __be16 wil_skb_get_protocol(struct sk_buff *skb)
{
	struct ethhdr *eth = (void *)skb->data;

	return eth->h_proto;
}

static inline bool wil_need_txstat(struct sk_buff *skb)
static inline bool wil_need_txstat(struct sk_buff *skb)
{
{
	const u8 *da = wil_skb_get_da(skb);
	const u8 *da = wil_skb_get_da(skb);