diff mbox

[2/2] mac80211: Fix WPA-NONE for RX unicast frames

Message ID 1266190346-2247-2-git-send-email-benoit.papillault@free.fr (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Benoit PAPILLAULT Feb. 14, 2010, 11:32 p.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 22ae6ee..f73fe9b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -923,6 +923,13 @@  ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
 		rx->key = rcu_dereference(rx->sdata->keys[keyidx]);
 
 		/*
+		 * Using WPA-NONE in IBSS, all frames, be it unicast or
+		 * multicast (including broadcast) are encrypted with the
+		 * same group key. In this case, we should not reset the key
+		 * to NULL
+		 */
+#if 0
+		/*
 		 * RSNA-protected unicast frames should always be sent with
 		 * pairwise or station-to-station keys, but for WEP we allow
 		 * using a key index as well.
@@ -930,6 +937,7 @@  ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
 		if (rx->key && rx->key->conf.alg != ALG_WEP &&
 		    !is_multicast_ether_addr(hdr->addr1))
 			rx->key = NULL;
+#endif
 	}
 
 	if (rx->key) {