diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-04-15 15:18:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-02 17:32:34 +0300 |
commit | 154be74e589cb8b8e44ceeab3798e072e0a11b9d (patch) | |
tree | 1cf778792f5ee5164e4a1b0e30d58c35f5f9b9f8 /net/mac80211/mesh.c | |
parent | 1ba4d2adf1aafb3917d4cdec314757e96cbca634 (diff) | |
download | linux-154be74e589cb8b8e44ceeab3798e072e0a11b9d.tar.xz |
wifi: mac80211: split mesh fast tx cache into local/proxied/forwarded
[ Upstream commit 8c75cdcdf869acabfdc7858827099dcde9f24e6c ]
Depending on the origin of the packets (and their SA), 802.11 + mesh headers
could be filled in differently. In order to properly deal with that, add a
new field to the lookup key, indicating the type (local, proxied or
forwarded). This can fix spurious packet drop issues that depend on the order
in which nodes/hosts communicate with each other.
Fixes: d5edb9ae8d56 ("wifi: mac80211: mesh fast xmit support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://msgid.link/20240415121811.13391-1-nbd@nbd.name
[use sizeof_field() for key_len]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index e31c312c124a..7b3ecc288f09 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -765,6 +765,9 @@ bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, u32 ctrl_flags) { struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; + struct ieee80211_mesh_fast_tx_key key = { + .type = MESH_FAST_TX_TYPE_LOCAL + }; struct ieee80211_mesh_fast_tx *entry; struct ieee80211s_hdr *meshhdr; u8 sa[ETH_ALEN] __aligned(2); @@ -800,7 +803,10 @@ bool ieee80211_mesh_xmit_fast(struct ieee80211_sub_if_data *sdata, return false; } - entry = mesh_fast_tx_get(sdata, skb->data); + ether_addr_copy(key.addr, skb->data); + if (!ether_addr_equal(skb->data + ETH_ALEN, sdata->vif.addr)) + key.type = MESH_FAST_TX_TYPE_PROXIED; + entry = mesh_fast_tx_get(sdata, &key); if (!entry) return false; |