From: Johannes Berg <johannes@sipsolutions.net>
To: Cedric Izoard <Cedric.Izoard@ceva-dsp.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Max Stepanov <Max.Stepanov@intel.com>
Subject: Re: [PATCH v2] mac80211: Get IV len from key conf and not cipher scheme
Date: Tue, 10 Mar 2015 17:48:41 +0100 [thread overview]
Message-ID: <1426006121.1926.6.camel@sipsolutions.net> (raw)
In-Reply-To: <5842EA9CC042B141995329508713AD672105A9FB@ILMAIL1.corp.local>
On Tue, 2015-03-10 at 16:46 +0000, Cedric Izoard wrote:
> > How can this be correct? You have a cipher scheme, so you want to
> > encrypt, but now you're not doing that? Perhaps you should drop the
> > frame instead?
> >
> On Tx, cipher scheme is "only" available trough sta pointer and is only
> used in ieee80211_crypto_cs_encrypt to get security header len.
> Since sta pointer is NULL for bcast messages, the proposed patch get the
> security header length using the key->conf.iv_len instead.
>
> If the key is installed with a cs, then key->conf.iv_len is initialized
> with cs->hdr_len.
>
> If the key is installed without a cs, then key->conf.iv_len is 0 (hence
> the early exit in ieee80211_crypto_cs_encrypt)
So in reality, you're checking "is this a CS key"? Perhaps there's a
better way to do that?
johannes
next prev parent reply other threads:[~2015-03-10 16:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 16:02 [PATCH v2] mac80211: Get IV len from key conf and not cipher scheme Cedric Izoard
2015-03-10 16:04 ` Johannes Berg
2015-03-10 16:46 ` Cedric Izoard
2015-03-10 16:48 ` Johannes Berg [this message]
2015-03-10 17:28 ` Cedric Izoard
2015-03-10 17:33 ` Johannes Berg
2015-03-11 8:17 ` Stepanov, Max
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=1426006121.1926.6.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Cedric.Izoard@ceva-dsp.com \
--cc=Max.Stepanov@intel.com \
--cc=linux-wireless@vger.kernel.org \
/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).