From: Gabriele Gristina <matrix.use.linux@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: [PATCH] mac80211: fixed injection in monitor mode
Date: Fri, 16 Oct 2009 04:09:21 +0200 [thread overview]
Message-ID: <1255658961.23827.2.camel@el8pc> (raw)
I have a problem with mac80211 injection:
if i setup interface in monitor mode with iwconfig and i try to send a
custum 802.11 frame i see twice the packet in monitor interface.
The first packet is right, the second is different only in the radiotap
header: rtap len is fixed to 13 bytes...
If i setup interface with airmon-ng the packet is sended once but the
radiotap header is fixed to 13 bytes.
Patch for 2.6.31.4
--- 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);
next reply other threads:[~2009-10-16 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 2:09 Gabriele Gristina [this message]
2009-10-16 14:03 ` [PATCH] mac80211: fixed injection in monitor mode John W. Linville
2009-10-16 14:46 ` Johannes Berg
2009-10-16 17:14 ` MatriX
2009-10-16 17:19 ` Richard Farina
2009-10-17 0:26 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1255658961.23827.2.camel@el8pc \
--to=matrix.use.linux@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.