diff mbox

mac80211: fixed injection in monitor mode

Message ID 1255658961.23827.2.camel@el8pc (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Gabriele Gristina Oct. 16, 2009, 2:09 a.m. UTC
None
diff mbox

Patch

--- net/mac80211/main.c.orig    2009-10-16 00:50:00.000000000 +0200
+++ net/mac80211/main.c    2009-10-15 23:06:03.000000000 +0200
@@ -607,6 +607,9 @@ 
     skb->protocol = htons(ETH_P_802_2);
     memset(skb->cb, 0, sizeof(skb->cb));
 
+    if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
+        goto out_no_echo;
+
     rcu_read_lock();
     list_for_each_entry_rcu(sdata, &local->interfaces, list) {
         if (sdata->vif.type == NL80211_IFTYPE_MONITOR) {
@@ -630,7 +633,8 @@ 
         skb = NULL;
     }
     rcu_read_unlock();
-    dev_kfree_skb(skb);
+out_no_echo:
+    if (skb) dev_kfree_skb(skb);
 }
 EXPORT_SYMBOL(ieee80211_tx_status);