Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Felix Fietkau" <nbd@nbd.name>, <linux-wireless@vger.kernel.org>
Cc: <johannes@sipsolutions.net>
Subject: Re: [PATCH wireless] wifi: cfg80211: fix receving mesh packets without RFC1042 header
Date: Tue, 11 Jul 2023 14:21:22 +0200	[thread overview]
Message-ID: <CTZC7J3QNXPE.LQ6QWU7ZR0L8@syracuse> (raw)
In-Reply-To: <20230711115052.68430-1-nbd@nbd.name>

On Tue Jul 11, 2023 at 1:50 PM CEST, Felix Fietkau wrote:
> 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-by: Nicolas Escande <nico.escande@gmail.com>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
>  net/wireless/util.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> 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) {

I tested this on my side and everything works again, so if you want/need it:

Tested-by: Nicolas Escande <nico.escande@gmail.com>

  reply	other threads:[~2023-07-11 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 11:50 [PATCH wireless] wifi: cfg80211: fix receving mesh packets without RFC1042 header Felix Fietkau
2023-07-11 12:21 ` Nicolas Escande [this message]
2023-07-13  1:03 ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CTZC7J3QNXPE.LQ6QWU7ZR0L8@syracuse \
    --to=nico.escande@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox