Commit aeb998c1 authored by Larry Finger's avatar Larry Finger Committed by Jeff Garzik

[PATCH] ieee80211-crypt: Make some TKIP and CCMP error logging conditional

There are messages arising from ieee80211_crypt that spam the logs
of casual users. These are changed to be logged only if the user
specifically requests the IEEE80211_DEBUG_DROP messages. In either
case, the error/drop count is incremented.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5d082fe8
...@@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (ccmp_replay_check(pn, key->rx_pn)) { if (ccmp_replay_check(pn, key->rx_pn)) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=" MAC_FMT
" previous PN %02x%02x%02x%02x%02x%02x " " previous PN %02x%02x%02x%02x%02x%02x "
"received PN %02x%02x%02x%02x%02x%02x\n", "received PN %02x%02x%02x%02x%02x%02x\n",
MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
......
...@@ -465,7 +465,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -465,7 +465,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=" MAC_FMT
" previous TSC %08x%04x received TSC " " previous TSC %08x%04x received TSC "
"%08x%04x\n", MAC_ARG(hdr->addr2), "%08x%04x\n", MAC_ARG(hdr->addr2),
tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
...@@ -507,7 +507,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -507,7 +507,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
tkey->rx_phase1_done = 0; tkey->rx_phase1_done = 0;
} }
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "TKIP: ICV error detected: STA=" IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA="
MAC_FMT "\n", MAC_ARG(hdr->addr2)); MAC_FMT "\n", MAC_ARG(hdr->addr2));
} }
tkey->dot11RSNAStatsTKIPICVErrors++; tkey->dot11RSNAStatsTKIPICVErrors++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment