From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, flamingice@sourmilk.net,
"John W. Linville" <linville@tuxdriver.com>
Subject: [RFC] mac80211: no missing key complaint if frame may not be for us
Date: Tue, 23 Oct 2007 17:46:20 -0400 [thread overview]
Message-ID: <1193175981828-git-send-email-linville@tuxdriver.com> (raw)
Some APs implement support for multiple SSIDs using a single BSSID.
Each SSID might implement a different protection scheme (or none
at all).
If we are associated with an unprotected SSID on an AP operating as
described above, we might receive multicast frames that are actually
intended for another SSID. If that SSID is protected, those frames
currently cause us to log a KERN_DEBUG message: "RX protected frame
but have no key". This can cause a lot of traffic in the logs.
Rather than complain if we receive a protected frame for which we
have no key, then let's just keep quiet unless we are in something
other than managed mode or unless the frame is unicast.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
net/mac80211/rx.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 064924c..1cc67ef 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -509,7 +509,13 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx)
rx->key->tx_rx_count++;
/* TODO: add threshold stuff again */
} else {
- if (net_ratelimit())
+ /* if there are multiple SSIDs on this BSSID, the frame may
+ not be for us anyway; so, check that either the frame is
+ unicast or that we are not in managed mode before
+ complaining about a missing key */
+ if ((!is_multicast_ether_addr(hdr->addr1) ||
+ rx->sdata->type != IEEE80211_IF_TYPE_STA) &&
+ net_ratelimit())
printk(KERN_DEBUG "%s: RX protected frame,"
" but have no key\n", rx->dev->name);
return TXRX_DROP;
--
1.5.2.4
next reply other threads:[~2007-10-23 22:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 21:46 John W. Linville [this message]
2007-10-23 21:46 ` [RFC] mac80211: no decrypt failed complaint if frame may not be for us John W. Linville
2007-10-24 9:00 ` [RFC] mac80211: no missing key " Johannes Berg
2007-10-24 13:48 ` John W. Linville
2007-10-25 13:25 ` 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=1193175981828-git-send-email-linville@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--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).