From: Christian Lamparter <chunkeey@googlemail.com>
To: Saqeb Akhter <saqeb.akhter@gmail.com>
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>,
Jouni Malinen <j@w1.fi>,
linville@tuxdriver.com
Subject: [PATCH for-2.6.37?] mac80211: ignore non-bcast mcast managment frames
Date: Mon, 29 Nov 2010 19:37:24 +0100 [thread overview]
Message-ID: <201011291937.25195.chunkeey@googlemail.com> (raw)
In-Reply-To: <201011291814.58230.chunkeey@googlemail.com>
This patch fixes an curious issue due to insufficient
rx frame filtering.
Saqeb Akhter reported frequent disconnects while streaming
videos over samba:
> [ 1166.512087] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
> [ 1526.059997] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
> [ 2125.324356] wlan1: deauthenticated from 30:46:9a:10:49:f7 (Reason: 7)
> [...]
The reason is that the device generates frames with slightly
bogus SA/TA addresses.
e.g.:
[ 2314.402316] Ignore 9f:1f:31:f8:64:ff
[ 2314.402321] Ignore 9f:1f:31:f8:64:ff
[ 2352.453804] Ignore 0d:1f:31:f8:64:ff
[ 2352.453808] Ignore 0d:1f:31:f8:64:ff
^^ the group-address flag is set!
(the correct SA/TA would be: 00:1f:31:f8:64:ff)
Since the AP does not know from where the frame comes from it
generates a DEAUTH response. This mcast mgmt frame confuses
the stack because the broadcast flag are not filtered and the
stack thinks we haven been kicked by the AP.
This patch fixes the problem simply by ignoring
non-broadcast group-addressed management frames.
Cc: <stable@kernel.org>
Cc: Jouni Malinen <j@w1.fi>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Saqeb Akhter <saqeb.akhter@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d2fcd22..3dbf79c 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1999,6 +1999,10 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
if (!ieee80211_is_mgmt(mgmt->frame_control))
return RX_DROP_MONITOR;
+ if (is_multicast_ether_addr(mgmt->da) &&
+ !is_broadcast_ether_addr(mgmt->da))
+ return RX_DROP_MONITOR;
+
if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
return RX_DROP_MONITOR;
next prev parent reply other threads:[~2010-11-29 18:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTimN3X_e4fZhUSoTs-GmQ9kmaJUrgnxAu8=W2dT_@mail.gmail.com>
2010-10-01 14:22 ` carl9170: wnda3100 only 54MB/s Saqeb Akhter
2010-10-01 14:36 ` Christian Lamparter
[not found] ` <AANLkTimZYgDLLag+uGgdojrckZ5tgySC+UeyHCfee74J@mail.gmail.com>
2010-10-01 22:34 ` Saqeb Akhter
2010-10-01 22:52 ` Christian Lamparter
2010-10-01 23:56 ` Saqeb Akhter
2010-10-02 0:26 ` Christian Lamparter
2010-10-02 2:32 ` Saqeb Akhter
2010-10-02 2:52 ` Christian Lamparter
2010-10-02 2:56 ` Saqeb Akhter
2010-10-02 3:19 ` Christian Lamparter
2010-10-02 3:28 ` Saqeb Akhter
2010-10-02 6:18 ` Saqeb Akhter
2010-10-02 11:32 ` Christian Lamparter
2010-10-02 16:40 ` Saqeb Akhter
2010-11-29 17:14 ` [RFC] mac80211: filter multicast rx (was: Re: carl9170: wnda3100 only 54MB/s) Christian Lamparter
2010-11-29 18:37 ` Christian Lamparter [this message]
2010-11-29 18:45 ` [PATCH for-2.6.37?] mac80211: ignore non-bcast mcast managment frames Johannes Berg
2010-11-29 19:53 ` [PATCH for-2.6.37 v2] mac80211: ignore non-bcast mcast deauth/disassoc franes Christian Lamparter
2010-12-04 21:38 ` Jouni Malinen
2010-10-04 17:58 ` carl9170: wnda3100 only 54MB/s Dan Williams
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=201011291937.25195.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=saqeb.akhter@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).