All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <larry.finger@lwfinger.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Jouni Malinen <j@w1.fi>, Michael Buesch <mb@bu3sch.de>,
	Michael Wu <flamingice@sourmilk.net>, Jiri Benc <jbenc@suse.cz>,
	Volker Braun <volker.braun@physik.hu-berlin.de>
Subject: Re: [RFC] mac80211: fix software decryption
Date: Mon, 20 Aug 2007 23:59:19 -0500	[thread overview]
Message-ID: <46CA7127.1070904@lwfinger.net> (raw)
In-Reply-To: <1187346385.23489.157.camel@johannes.berg>

Johannes Berg wrote:
> When doing key selection for software decryption, mac80211 gets
> a few things wrong: it always uses pairwise keys if configured,
> even if the frame is addressed to a multicast address. Also, it
> doesn't allow using a key index of zero if a pairwise key has
> also been found.
> 
> This patch changes the key selection code to be (more) in line
> with the 802.11 specification. I have confirmed that with this,
> multicast frames are correctly decrypted and I've tested with
> WEP as well.
> 
> While at it, I've cleaned up the semantics of the hardware flags
> IEEE80211_HW_WEP_INCLUDE_IV and IEEE80211_HW_DEVICE_HIDES_WEP
> and clarified them in the mac80211.h header; it is also now
> allowed to set the IEEE80211_HW_DEVICE_HIDES_WEP option even if
> it only applies to frames that have been decrypted by the hw,
> unencrypted frames must be dropped but encrypted frames that
> the hardware couldn't handle can be passed up unmodified.
> 
> Support for group keys in IBSS mode is pending until we figure
> out how to handle that. It will also, like with VLANs, require
> a hardware encryption API change.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> 
> ---
> Michael, you should really get rid of IEEE80211_HW_DEVICE_HIDES_WEP
> in b43, otherwise you'll have to start dropping unencrypted
> frames and handle 802.1X callbacks and stuff to guarantee
> proper operation.
> 
> I would be much in favour of removing the option completely,
> it's IMHO misused in b43 and no other driver uses it.
> 
> Volker, can you test whether this patch (possibly together with
> yours removing privacy and key index checking) helps with your
> dynamic WEP? I think it should.
> 
> Larry, could you verify that this gets rid of your messages? It
> does for me but then I'm using CCMP and not TKIP so maybe there's
> something special again.

Using the large patch you sent me plus the one that fixed the crash due to usage after freeing, I 
can now connect using both WPA and WEP. My settings for the hw->flags is

        hw->flags = IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE |
                     IEEE80211_HW_DEVICE_HIDES_WEP | IEEE80211_HW_WEP_INCLUDE_IV;

With WPA, I no longer get those messages; however, I get a lot of those "No ProbeResp" messages with 
a subsequent reassociation rather often as shown in my log fragment below:

Aug 20 23:49:21 larrylap kernel: eth1: No ProbeResp from current AP 00:1a:70:46:ba:b1 - assume out 
of range
Aug 20 23:49:22 larrylap kernel: eth1: No STA entry for own AP 00:1a:70:46:ba:b1
Aug 20 23:49:22 larrylap kernel: eth1: Initial auth_alg=0
Aug 20 23:49:22 larrylap kernel: eth1: authenticate with AP 00:1a:70:46:ba:b1
Aug 20 23:49:22 larrylap kernel: eth1: RX authentication from 00:1a:70:46:ba:b1 (alg=0 transaction=2 
status=0)
Aug 20 23:49:22 larrylap kernel: eth1: authenticated
Aug 20 23:49:22 larrylap kernel: eth1: associate with AP 00:1a:70:46:ba:b1
Aug 20 23:49:22 larrylap kernel: eth1: RX ReassocResp from 00:1a:70:46:ba:b1 (capab=0x431 status=0 
aid=1)
Aug 20 23:49:22 larrylap kernel: eth1: associated
Aug 20 23:50:23 larrylap kernel: eth1: No ProbeResp from current AP 00:1a:70:46:ba:b1 - assume out 
of range
Aug 20 23:50:24 larrylap kernel: eth1: No STA entry for own AP 00:1a:70:46:ba:b1
Aug 20 23:50:24 larrylap kernel: eth1: Initial auth_alg=0
Aug 20 23:50:24 larrylap kernel: eth1: authenticate with AP 00:1a:70:46:ba:b1
Aug 20 23:50:24 larrylap kernel: eth1: RX authentication from 00:1a:70:46:ba:b1 (alg=0 transaction=2 
status=0)
Aug 20 23:50:24 larrylap kernel: eth1: authenticated
Aug 20 23:50:24 larrylap kernel: eth1: associate with AP 00:1a:70:46:ba:b1
Aug 20 23:50:24 larrylap kernel: eth1: RX ReassocResp from 00:1a:70:46:ba:b1 (capab=0x431 status=0 
aid=1)
Aug 20 23:50:24 larrylap kernel: eth1: associated

Thanks,

Larry



  parent reply	other threads:[~2007-08-21  4:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17 10:26 [RFC] mac80211: fix software decryption Johannes Berg
     [not found] ` <46C5CC0D.2040609@lwfinger.net>
     [not found]   ` <1187384230.6090.7.camel@johannes.berg>
     [not found]     ` <46C612E8.4020604@lwfinger.net>
     [not found]       ` <1187387215.6090.13.camel@johannes.berg>
     [not found]         ` <46C64777.1000602@lwfinger.net>
     [not found]           ` <1187453173.6090.33.camel@johannes.berg>
2007-08-18 20:13             ` [RFC] mac80211: fix software decryption with b43legacy Larry Finger
2007-08-20 11:20               ` Johannes Berg
2007-08-20 12:09               ` Johannes Berg
2007-08-20 17:36                 ` Larry Finger
2007-08-20 22:43               ` Ulrich Kunitz
2007-08-21  0:18                 ` Larry Finger
2007-08-21  4:59 ` Larry Finger [this message]
2007-08-21 10:06   ` [RFC] mac80211: fix software decryption Johannes Berg

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=46CA7127.1070904@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=flamingice@sourmilk.net \
    --cc=j@w1.fi \
    --cc=jbenc@suse.cz \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=volker.braun@physik.hu-berlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.