From: Felix Fietkau <nbd@openwrt.org>
To: Bill Jordan <bjordan@rajant.com>
Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org,
linville@tuxdriver.com
Subject: Re: [PATCH] ath9k: fix MGMT packets when using TKIP
Date: Wed, 17 Aug 2011 17:52:40 -0700 [thread overview]
Message-ID: <4E4C6258.1030409@openwrt.org> (raw)
In-Reply-To: <1313611597-17662-1-git-send-email-bjordan@rajant.com>
On 2011-08-17 1:06 PM, Bill Jordan wrote:
> Prevent 8 bytes from being truncated from MGMT packets
> when using TKIP.
>
> Signed-off-by: Bill Jordan<bjordan@rajant.com>
> ---
> drivers/net/wireless/ath/ath9k/recv.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index 7409402..d8737f2 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -824,7 +824,8 @@ static bool ath9k_rx_accept(struct ath_common *common,
> is_mc = !!is_multicast_ether_addr(hdr->addr1);
> is_valid_tkip = rx_stats->rs_keyix != ATH9K_RXKEYIX_INVALID&&
> test_bit(rx_stats->rs_keyix, common->tkip_keymap);
> - strip_mic = is_valid_tkip&& !(rx_stats->rs_status&
> + strip_mic = is_valid_tkip&& !ieee80211_is_mgmt(fc)&&
> + !(rx_stats->rs_status&
> (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC));
>
> if (!rx_stats->rs_datalen)
Maybe it would be a better idea to check for ieee80211_is_data(fc)
instead of !ieee80211_is_mgmt(fc) - just to avoid more potential corner
cases.
- Felix
next prev parent reply other threads:[~2011-08-18 0:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 21:31 [BUG] ath9k truncated management packets from TKIP connected stations Bill Jordan
2011-08-16 22:52 ` Felix Fietkau
2011-08-17 20:06 ` [PATCH] ath9k: fix MGMT packets when using TKIP Bill Jordan
2011-08-18 0:52 ` Felix Fietkau [this message]
2011-08-19 15:10 ` Bill Jordan
2011-08-22 8:11 ` Kalle Valo
2011-08-23 21:59 ` Bill Jordan
2011-08-23 22:14 ` Christian Lamparter
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=4E4C6258.1030409@openwrt.org \
--to=nbd@openwrt.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=bjordan@rajant.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).