Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66426
b: refs/heads/master
c: aa0daf0
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Oct 10, 2007
1 parent b375d9f commit 1eddf07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 475fa49c125d914451805a9fb3cd1baa53591538
refs/heads/master: aa0daf0e020de9c20e653e437deaa1153c4d134e
25 changes: 11 additions & 14 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,18 +1179,17 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
else
keyidx = -1;

/* TODO: verify that this is not triggered by fragmented
* frames (hw does not verify MIC for them). */
if (net_ratelimit())
printk(KERN_DEBUG "%s: TKIP hwaccel reported Michael MIC "
"failure from " MAC_FMT " to " MAC_FMT " keyidx=%d\n",
dev->name, MAC_ARG(hdr->addr2), MAC_ARG(hdr->addr1),
keyidx);

if (!sta) {
/* Some hardware versions seem to generate incorrect
* Michael MIC reports; ignore them to avoid triggering
* countermeasures. */
/*
* Some hardware seem to generate incorrect Michael MIC
* reports; ignore them to avoid triggering countermeasures.
*/
if (net_ratelimit())
printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
"error for unknown address " MAC_FMT "\n",
Expand All @@ -1201,16 +1200,18 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
if (!(rx->fc & IEEE80211_FCTL_PROTECTED)) {
if (net_ratelimit())
printk(KERN_DEBUG "%s: ignored spurious Michael MIC "
"error for a frame with no ISWEP flag (src "
"error for a frame with no PROTECTED flag (src "
MAC_FMT ")\n", dev->name, MAC_ARG(hdr->addr2));
goto ignore;
}

if (rx->sdata->type == IEEE80211_IF_TYPE_AP && keyidx) {
/* AP with Pairwise keys support should never receive Michael
* MIC errors for non-zero keyidx because these are reserved
* for group keys and only the AP is sending real multicast
* frames in BSS. */
/*
* APs with pairwise keys should never receive Michael MIC
* errors for non-zero keyidx because these are reserved for
* group keys and only the AP is sending real multicast
* frames in the BSS.
*/
if (net_ratelimit())
printk(KERN_DEBUG "%s: ignored Michael MIC error for "
"a frame with non-zero keyidx (%d)"
Expand All @@ -1230,10 +1231,6 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
goto ignore;
}

/* TODO: consider verifying the MIC error report with software
* implementation if we get too many spurious reports from the
* hardware. */

mac80211_ev_michael_mic_failure(rx->dev, keyidx, hdr);
ignore:
dev_kfree_skb(rx->skb);
Expand Down

0 comments on commit 1eddf07

Please sign in to comment.