From: "Jonas Karlsson" <jonas@gobolinux.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] make decrypt messages depend on CONFIG_IEEE80211_DEBUG
Date: Sat, 05 Jul 2008 23:55:10 +0200 [thread overview]
Message-ID: <op.udt9t8avdefb7q@localhost.localdomain> (raw)
Here's a corresponding patch for commit
7f3ad8943e2e6336ba229b208be8c7a80730c5d4 but for the old ieee80211 stack,
which is still used for, at least, ipw2x00 cards. It will make decrypt and
key debug errors depend on CONFIG_IEEE80211_DEBUG. Without this the logs
will be filled with debug printouts.
--
Jonas Karlsson
(please CC me when replying)
--- linux-2.6.25.10/net/ieee80211/ieee80211_crypt_ccmp.c.old 2008-07-05
22:36:45.000000000 +0200
+++ linux-2.6.25.10/net/ieee80211/ieee80211_crypt_ccmp.c 2008-07-05
22:38:30.000000000 +0200
@@ -307,25 +307,31 @@
pos = skb->data + hdr_len;
keyidx = pos[3];
if (!(keyidx & (1 << 5))) {
+#ifdef CONFIG_IEEE80211_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: received packet without ExtIV"
" flag from %s\n", print_mac(mac, hdr->addr2));
}
+#endif
key->dot11RSNAStatsCCMPFormatErrors++;
return -2;
}
keyidx >>= 6;
if (key->key_idx != keyidx) {
+#ifdef CONFIG_IEEE80211_DEBUG
printk(KERN_DEBUG "CCMP: RX tkey->key_idx=%d frame "
"keyidx=%d priv=%p\n", key->key_idx, keyidx, priv);
+#endif
return -6;
}
if (!key->key_set) {
+#ifdef CONFIG_IEEE80211_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: received packet from %s"
" with keyid=%d that does not have a configured"
" key\n", print_mac(mac, hdr->addr2), keyidx);
}
+#endif
return -3;
}
@@ -338,6 +344,7 @@
pos += 8;
if (ccmp_replay_check(pn, key->rx_pn)) {
+#ifdef CONFIG_IEEE80211_DEBUG
if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) {
IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%s "
"previous PN %02x%02x%02x%02x%02x%02x "
@@ -347,6 +354,7 @@
key->rx_pn[3], key->rx_pn[4], key->rx_pn[5],
pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]);
}
+#endif
key->dot11RSNAStatsCCMPReplays++;
return -4;
}
@@ -371,10 +379,12 @@
}
if (memcmp(mic, a, CCMP_MIC_LEN) != 0) {
+#ifdef CONFIG_IEEE80211_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: decrypt failed: STA="
"%s\n", print_mac(mac, hdr->addr2));
}
+#endif
key->dot11RSNAStatsCCMPDecryptErrors++;
return -5;
}
reply other threads:[~2008-07-05 21:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=op.udt9t8avdefb7q@localhost.localdomain \
--to=jonas@gobolinux.org \
--cc=linux-kernel@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