All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] d80211: fix crash in ieee80211_rx_michael_mic_report()
@ 2006-08-25 21:12 David Kimdon
  0 siblings, 0 replies; only message in thread
From: David Kimdon @ 2006-08-25 21:12 UTC (permalink / raw)
  To: netdev; +Cc: John W. Linville, Jiri Benc, Elliot Schwartz, David Kimdon

[-- Attachment #1: michael_mic_failure_crash.patch --]
[-- Type: text/plain, Size: 1168 bytes --]

This fixes a crash at ieee80211.c line 3461, ieee80211_rx_michael_mic_report()
(rx->sdata->type == IEEE80211_IF_TYPE_AP).  rx.sdata needs to be set before
calling ieee80211_rx_michael_mic_report().

Signed-off-by: Elliot Schwartz <elliot@devicescape.com>
Signed-off-by: David Kimdon <david.kimdon@devicescape.com>

Index: wireless-dev/net/d80211/ieee80211.c
===================================================================
--- wireless-dev.orig/net/d80211/ieee80211.c
+++ wireless-dev/net/d80211/ieee80211.c
@@ -3582,6 +3582,11 @@ void __ieee80211_rx(struct net_device *d
 	else
 		sta = rx.sta = NULL;
 
+	if (sta) {
+		rx.dev = sta->dev;
+		rx.sdata = IEEE80211_DEV_TO_SUB_IF(rx.dev);
+	}
+
         if ((status->flag & RX_FLAG_MMIC_ERROR)) {
 		ieee80211_rx_michael_mic_report(dev, hdr, sta, &rx);
 		goto end;
@@ -3597,8 +3602,6 @@ void __ieee80211_rx(struct net_device *d
 
 	if (sta && !sta->assoc_ap && !(sta->flags & WLAN_STA_WDS) &&
 	    !local->iff_promiscs && !multicast) {
-		rx.dev = sta->dev;
-		rx.sdata = IEEE80211_DEV_TO_SUB_IF(rx.dev);
 		rx.u.rx.ra_match = 1;
 		ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx,
 					     sta);

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-25 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-25 21:12 [patch] d80211: fix crash in ieee80211_rx_michael_mic_report() David Kimdon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.