linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Felix Fietkau <nbd@nbd.name>, Michael Braun <michael-dev@fami-braun.de>
Cc: linux-wireless@vger.kernel.org, projekt-wlan@fem.tu-ilmenau.de
Subject: Re: [PATCHv4] mac80211: fix A-MSDU outer SA/DA
Date: Thu, 13 Oct 2016 09:23:51 +0200	[thread overview]
Message-ID: <1476343431.4904.7.camel@sipsolutions.net> (raw)
In-Reply-To: <fc2ae46b-f049-41de-3eec-465e83b5ecef@nbd.name>


> > +     /* h_80211_src/dst is addr* field within hdr */
> > +     h_80211_src = data + fast_tx->sa_offs;
> > +     h_80211_dst = data + fast_tx->da_offs;

[...]

> > +	if (bssid && ieee80211_has_fromds(hdr->frame_control))
> > +		memcpy(h_80211_src, bssid, ETH_ALEN);
> > +
> > +	if (bssid && ieee80211_has_tods(hdr->frame_control))
> > +		memcpy(h_80211_dst, bssid, ETH_ALEN);

> I think this is probably wrong for 4-addr, since there both FromDS
> and ToDS are set. Maybe you should use !ieee80211_has_tods instead of
> ieee80211_has_fromds and vice versa.

It helps to look at the spec ;-)

For 4-addr frames, dest/src are addr 3/4 respectively, and in the spec
both *should* actually be set to the BSSID.

It's kinda pointless to be doing that and using a 4-addr frame here,
but I suppose it would be expected by the receiver in 4-addr mode, so
makes some sense.

johannes

      reply	other threads:[~2016-10-13  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13  5:41 [PATCHv4] mac80211: fix A-MSDU outer SA/DA Michael Braun
2016-10-13  6:56 ` Johannes Berg
2016-10-13  7:19 ` Felix Fietkau
2016-10-13  7:23   ` Johannes Berg [this message]

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=1476343431.4904.7.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michael-dev@fami-braun.de \
    --cc=nbd@nbd.name \
    --cc=projekt-wlan@fem.tu-ilmenau.de \
    /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;
as well as URLs for NNTP newsgroup(s).