1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sun, 26 Feb 2023 20:30:20 +0100
3 Subject: [PATCH] wifi: mac80211: fix mesh path discovery based on unicast
6 If a packet has reached its intended destination, it was bumped to the code
7 that accepts it, without first checking if a mesh_path needs to be created
8 based on the discovered source.
9 Fix this by moving the destination address check further down
11 Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
12 Signed-off-by: Felix Fietkau <nbd@nbd.name>
15 --- a/net/mac80211/rx.c
16 +++ b/net/mac80211/rx.c
17 @@ -2824,17 +2824,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
18 mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
19 return RX_DROP_MONITOR;
21 - /* Frame has reached destination. Don't forward */
22 - if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
25 - if (!ifmsh->mshcfg.dot11MeshForwarding) {
26 - if (is_multicast_ether_addr(eth->h_dest))
29 - return RX_DROP_MONITOR;
33 if (sdata->crypto_tx_tailroom_needed_cnt)
34 tailroom = IEEE80211_ENCRYPT_TAILROOM;
35 @@ -2881,6 +2870,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
39 + /* Frame has reached destination. Don't forward */
40 + if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
43 + if (!ifmsh->mshcfg.dot11MeshForwarding) {
44 + if (is_multicast_ether_addr(eth->h_dest))
47 + return RX_DROP_MONITOR;
50 skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);