* [PATCH] mac80211: check RX crypto for sta key
@ 2010-08-12 11:14 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2010-08-12 11:14 UTC (permalink / raw)
To: John Linville; +Cc: Juuso Oikarinen, linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
My previous patch removing decrypted && iv-stripped
checks from the crypto algorithms turned out to be
completely wrong since in the common case of using
a per-station key the check wasn't there. Rather
than revert it, add a check to this case so that
the crypto algorithms don't need to be able to deal
with already decrypted and verified frames.
Reported-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/rx.c | 3 +++
1 file changed, 3 insertions(+)
--- wireless-testing.orig/net/mac80211/rx.c 2010-08-11 14:37:13.000000000 +0200
+++ wireless-testing/net/mac80211/rx.c 2010-08-12 13:11:17.000000000 +0200
@@ -873,6 +873,9 @@ ieee80211_rx_h_decrypt(struct ieee80211_
if (!is_multicast_ether_addr(hdr->addr1) && stakey) {
rx->key = stakey;
+ if ((status->flag & RX_FLAG_DECRYPTED) &&
+ (status->flag & RX_FLAG_IV_STRIPPED))
+ return RX_CONTINUE;
/* Skip decryption if the frame is not protected. */
if (!ieee80211_has_protected(fc))
return RX_CONTINUE;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-12 11:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 11:14 [PATCH] mac80211: check RX crypto for sta key Johannes Berg
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).