linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
	Denis Kenzior <denkenz@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"hostap@lists.infradead.org" <hostap@lists.infradead.org>
Subject: Re: Question on setting key right after the EAPOL 4/4 is sent.
Date: Fri, 09 Jun 2017 22:01:20 +0200	[thread overview]
Message-ID: <1497038480.12088.6.camel@sipsolutions.net> (raw)
In-Reply-To: <de7611e7-c34d-26e2-4083-b7e01b657426@candelatech.com>

On Fri, 2017-06-09 at 06:46 -0700, Ben Greear wrote:

> > However, the solution is far simpler! Once you have nl80211 PAE
> > transport, you can easily even set the key before transmitting the
> > packet and simply indicate that this particular packet should _not_
> > be encrypted regardless of key presence.
> 
> My ath10k firmware cannot deal with a case like this:
> 
> pkt is enqueued before key is set
> key is set
> pkt is transmitted (incorrectly)
> 
> This is because of how the tid's header-length variables are set up
> and modified when the keys are set, and I don't see any good way to
> fix this.

That seems awful, and anyway will not work with the mentioned non-IEEE
protocols that require not encrypting the rekeying frames even when
keys have been set up.

I don't know what to tell you here, I think it'd be best if you fix
that. 

> Stock ath10k firmware goes to great lengths to parse EAPOL frames and
> try to work around it in that manner, but that breaks .11r (or used
> to, I haven't tried stock firmware lately) and adds more complexity
> to the code.

It just has to be a single flag saying "don't encrypt this frame" -
nothing super complicated about that?

In ath10k it looks like HTT_DATA_TX_DESC_FLAGS0_NO_ENCRYPT gets set for
this, seems easy enough?

>  From a patch someone sent to hostapd list last night, it seems we
> could get the tx-status for the EAPOL 4/4, and in that case, we
> *know* the pkt has been transmitted, so we can then set the key
> safely it would seem?

I think so, and I don't remember why we dismissed this solution. Could
be that we just decided solving the bridging issue at the same time,
while not introducing more latency, was better.

Also, the other way can possibly solve some PTK rekeying issues, so
overall the solution to go all the way seems better.

johannes

  reply	other threads:[~2017-06-09 20:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 23:17 Question on setting key right after the EAPOL 4/4 is sent Ben Greear
2017-06-08 23:36 ` Denis Kenzior
2017-06-08 23:43   ` Ben Greear
2017-06-09  0:07     ` Denis Kenzior
2017-06-09  7:28       ` Johannes Berg
2017-06-09 13:10         ` Denis Kenzior
2017-06-09 19:56           ` Johannes Berg
2017-06-09 21:42             ` LINKMODE & OPERSTATE thoughts Denis Kenzior
2017-06-13  9:15               ` Johannes Berg
2017-06-09 13:46         ` Question on setting key right after the EAPOL 4/4 is sent Ben Greear
2017-06-09 20:01           ` Johannes Berg [this message]
2017-06-09 20:18             ` Ben Greear
2017-06-09 21:47               ` Janusz Dziedzic
2017-06-09 22:02                 ` Ben Greear
     [not found]                   ` <CADP2NhbXgHWo+BWhrKQndu5X7fzd2J9teqf-o6fSWwDMv8X5Hw@mail.gmail.com>
2017-06-10 16:01                     ` Ben Greear
2017-06-10 19:13               ` Arend van Spriel

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=1497038480.12088.6.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=denkenz@gmail.com \
    --cc=greearb@candelatech.com \
    --cc=hostap@lists.infradead.org \
    --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).