Search Linux Wireless

Re: [PATCH] ath9k: fix MGMT packets when using TKIP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
  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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux