mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
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: Ahmad Masri <amasri@codeaurora.org>
This commit is contained in:
parent
317d25c757
commit
c55f25ffb3
2 changed files with 12 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: ISC
|
||||
/*
|
||||
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
|
@ -942,7 +942,9 @@ void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
|
|||
wil_dbg_txrx(wil, "Rx drop %d bytes\n", len);
|
||||
return;
|
||||
}
|
||||
} 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) {
|
||||
/* send multicast frames both to higher layers in
|
||||
* local net stack and back to the wireless medium
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: ISC */
|
||||
/*
|
||||
* Copyright (c) 2012-2016 Qualcomm Atheros, Inc.
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef WIL6210_TXRX_H
|
||||
|
|
@ -610,6 +610,13 @@ static inline u8 *wil_skb_get_sa(struct sk_buff *skb)
|
|||
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)
|
||||
{
|
||||
const u8 *da = wil_skb_get_da(skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue