diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-07-11 13:50:52 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-07-12 18:03:40 -0700 |
commit | fec3ebb5ed299ac3a998f011c380f2ded47f4866 (patch) | |
tree | f432a0eabddb8e826f8455f58ed94639c587b1b9 /net/wireless | |
parent | 4f4626cd049576af1276c7568d5b44eb3f7bb1b1 (diff) | |
download | linux-fec3ebb5ed299ac3a998f011c380f2ded47f4866.tar.gz linux-fec3ebb5ed299ac3a998f011c380f2ded47f4866.tar.bz2 linux-fec3ebb5ed299ac3a998f011c380f2ded47f4866.zip |
wifi: cfg80211: fix receiving mesh packets without RFC1042 header
Fix ethernet header length field after stripping the mesh header
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
Reported-and-tested-by: Nicolas Escande <nico.escande@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20230711115052.68430-1-nbd@nbd.name
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 89c9ad6c886e..1783ab9d57a3 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb) hdrlen += ETH_ALEN + 2; else if (!pskb_may_pull(skb, hdrlen)) return -EINVAL; + else + payload.eth.h_proto = htons(skb->len - hdrlen); mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN; switch (payload.flags & MESH_FLAGS_AE) { |