From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] hostapd: remove vlan stuff
Date: Fri, 17 Aug 2007 00:39:10 +0200 [thread overview]
Message-ID: <1187303950.23489.84.camel@johannes.berg> (raw)
In-Reply-To: <20070816012239.GQ1415@jm.kir.nu>
[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]
On Wed, 2007-08-15 at 18:22 -0700, Jouni Malinen wrote:
> This doesn't sound like a good idea. How would macvlan-based alternative
> solve the problem of having different group keys for each VLAN?
This is actually more complicated than it seems.
Currently, we have this code doing key selection:
if (rx->sdata->type == IEEE80211_IF_TYPE_STA)
always_sta_key = 0;
else
always_sta_key = 1;
if (rx->sta && rx->sta->key && always_sta_key) {
rx->key = rx->sta->key;
which means that we'll always use the per-sta key unless that sta
doesn't have one configured (can that happen?!). And if we do have a sta
key, then we don't handle multicast/broadcast frames correctly as I've
just confirmed in the "meaningless TKIP messages" thread.
Reading 802.11, it seems that there are basically the following keys we
need to know about at this level:
* PTKs
* GTKs
* STKs
For the purposes of mac80211, however, PTKs and STKs should be identical
as far as I can tell, they are just STA keys, used to send and receive
unicast frames to/from that STA.
Hence, the way I see it, initially key selection should simply work as
follows:
(1) if the frame is unicast and there is a key for the sending STA,
use it; it will be a PTK or STK
(2) otherwise, use the key based on the key index, in an IBSS take into
account the transmitter; the found key will be a GTK or WEP key
based on that, I don't understand what ieee80211_rx_h_load_key is doing;
is there a scenario where this selection doesn't work?
I'll try to come up with a fix first that also makes dynamic WEP work,
stay tuned.
Now, anyhow, this thread was about VLANs, so it appears that what we'll
have to do is modify the code to take into account VLAN group keys.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
prev parent reply other threads:[~2007-08-17 10:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 22:41 [PATCH] hostapd: remove vlan stuff Johannes Berg
2007-08-15 12:24 ` [PATCH v2] " Johannes Berg
2007-08-16 1:22 ` Jouni Malinen
2007-08-16 13:20 ` Johannes Berg
2007-08-17 3:06 ` Jouni Malinen
2007-08-17 10:12 ` Johannes Berg
2007-08-16 22:39 ` 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=1187303950.23489.84.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=j@w1.fi \
--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).