diff options
Diffstat (limited to 'net/wireless/lib80211_crypt_tkip.c')
| -rw-r--r-- | net/wireless/lib80211_crypt_tkip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c index 7e8e22bfed90..c36287399d7e 100644 --- a/net/wireless/lib80211_crypt_tkip.c +++ b/net/wireless/lib80211_crypt_tkip.c | |||
| @@ -465,12 +465,14 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
| 465 | pos += 8; | 465 | pos += 8; |
| 466 | 466 | ||
| 467 | if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { | 467 | if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { |
| 468 | #ifdef CONFIG_LIB80211_DEBUG | ||
| 468 | if (net_ratelimit()) { | 469 | if (net_ratelimit()) { |
| 469 | printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" | 470 | printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" |
| 470 | " previous TSC %08x%04x received TSC " | 471 | " previous TSC %08x%04x received TSC " |
| 471 | "%08x%04x\n", hdr->addr2, | 472 | "%08x%04x\n", hdr->addr2, |
| 472 | tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); | 473 | tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); |
| 473 | } | 474 | } |
| 475 | #endif | ||
| 474 | tkey->dot11RSNAStatsTKIPReplays++; | 476 | tkey->dot11RSNAStatsTKIPReplays++; |
| 475 | return -4; | 477 | return -4; |
| 476 | } | 478 | } |
| @@ -505,10 +507,12 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
| 505 | * it needs to be recalculated for the next packet. */ | 507 | * it needs to be recalculated for the next packet. */ |
| 506 | tkey->rx_phase1_done = 0; | 508 | tkey->rx_phase1_done = 0; |
| 507 | } | 509 | } |
| 510 | #ifdef CONFIG_LIB80211_DEBUG | ||
| 508 | if (net_ratelimit()) { | 511 | if (net_ratelimit()) { |
| 509 | printk(KERN_DEBUG "TKIP: ICV error detected: STA=" | 512 | printk(KERN_DEBUG "TKIP: ICV error detected: STA=" |
| 510 | "%pM\n", hdr->addr2); | 513 | "%pM\n", hdr->addr2); |
| 511 | } | 514 | } |
| 515 | #endif | ||
| 512 | tkey->dot11RSNAStatsTKIPICVErrors++; | 516 | tkey->dot11RSNAStatsTKIPICVErrors++; |
| 513 | return -5; | 517 | return -5; |
| 514 | } | 518 | } |
