rpms/kernel/F-8 linux-2.6-mac80211-decryption-noise.patch, NONE, 1.1 kernel.spec, 1.241, 1.242

John W. Linville (linville) fedora-extras-commits at redhat.com
Wed Oct 24 00:34:43 UTC 2007


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24895

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-mac80211-decryption-noise.patch 
Log Message:
quiet mac80211 decryption noise when frames may not be for us

linux-2.6-mac80211-decryption-noise.patch:

--- NEW FILE linux-2.6-mac80211-decryption-noise.patch ---
diff -up linux-2.6.23.noarch/net/mac80211/rx.c.orig linux-2.6.23.noarch/net/mac80211/rx.c
--- linux-2.6.23.noarch/net/mac80211/rx.c.orig	2007-10-23 20:18:05.000000000 -0400
+++ linux-2.6.23.noarch/net/mac80211/rx.c	2007-10-23 20:22:21.000000000 -0400
@@ -568,6 +568,8 @@ ieee80211_rx_h_wep_weak_iv_detection(str
 static ieee80211_txrx_result
 ieee80211_rx_h_wep_decrypt(struct ieee80211_txrx_data *rx)
 {
+	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data;
+
 	if ((rx->key && rx->key->conf.alg != ALG_WEP) ||
 	    !(rx->fc & IEEE80211_FCTL_PROTECTED) ||
 	    ((rx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA &&
@@ -576,7 +578,13 @@ ieee80211_rx_h_wep_decrypt(struct ieee80
 		return TXRX_CONTINUE;
 
 	if (!rx->key) {
-		if (net_ratelimit())
+		/* if there are multiple SSIDs on this BSSID, the frame may
+		   not be for us anyway; so, check that either the frame is
+		   unicast or that we are not in managed mode before
+		   complaining about a missing key */
+		if ((!is_multicast_ether_addr(hdr->addr1) ||
+		     rx->sdata->type != IEEE80211_IF_TYPE_STA) &&
+		    net_ratelimit())
 			printk(KERN_DEBUG "%s: RX WEP frame, but no key set\n",
 			       rx->dev->name);
 		return TXRX_DROP;
diff -up linux-2.6.23.noarch/net/mac80211/wpa.c.orig linux-2.6.23.noarch/net/mac80211/wpa.c
--- linux-2.6.23.noarch/net/mac80211/wpa.c.orig	2007-10-23 20:25:09.000000000 -0400
+++ linux-2.6.23.noarch/net/mac80211/wpa.c	2007-10-23 20:25:03.000000000 -0400
@@ -462,9 +462,16 @@ ieee80211_rx_h_tkip_decrypt(struct ieee8
 					  skb->len - hdrlen, rx->sta->addr,
 					  hwaccel, rx->u.rx.queue);
 	if (res != TKIP_DECRYPT_OK || wpa_test) {
-		printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from "
-		       MAC_FMT " (res=%d)\n",
-		       rx->dev->name, MAC_ARG(rx->sta->addr), res);
+		/* if there are multiple SSIDs on this BSSID, the frame may
+		   not be for us anyway; so, check that either the frame is
+		   unicast or that we are not in managed mode before
+		   complaining about a missing key */
+		if ((!is_multicast_ether_addr(hdr->addr1) ||
+		     rx->sdata->type != IEEE80211_IF_TYPE_STA) &&
+		    net_ratelimit())
+			printk(KERN_DEBUG "%s: TKIP decrypt failed for RX "
+			       "frame from " MAC_FMT " (res=%d)\n",
+			       rx->dev->name, MAC_ARG(rx->sta->addr), res);
 		return TXRX_DROP;
 	}
 
@@ -773,9 +780,17 @@ ieee80211_rx_h_ccmp_decrypt(struct ieee8
 			    skb->data + hdrlen + CCMP_HDR_LEN, data_len,
 			    skb->data + skb->len - CCMP_MIC_LEN,
 			    skb->data + hdrlen + CCMP_HDR_LEN)) {
-			printk(KERN_DEBUG "%s: CCMP decrypt failed for RX "
-			       "frame from " MAC_FMT "\n", rx->dev->name,
-			       MAC_ARG(rx->sta->addr));
+			/* if there are multiple SSIDs on this BSSID,
+			   the frame may not be for us anyway; so, check
+			   that either the frame is unicast or that we
+			   are not in managed mode before complaining
+			   about a missing key */
+			if ((!is_multicast_ether_addr(hdr->addr1) ||
+			     rx->sdata->type != IEEE80211_IF_TYPE_STA) &&
+			    net_ratelimit())
+				printk(KERN_DEBUG "%s: CCMP decrypt failed "
+				       "for RX frame from " MAC_FMT "\n",
+				       rx->dev->name, MAC_ARG(rx->sta->addr));
 			return TXRX_DROP;
 		}
 	}


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -r1.241 -r1.242
--- kernel.spec	23 Oct 2007 18:27:29 -0000	1.241
+++ kernel.spec	24 Oct 2007 00:34:09 -0000	1.242
@@ -641,6 +641,7 @@
 Patch693: linux-2.6-zd1211rw-mac80211.patch
 Patch694: linux-2.6-mac80211-extras.patch
 Patch695: linux-2.6-wireless-fixes.patch
+Patch696: linux-2.6-mac80211-decryption-noise.patch
 Patch700: linux-2.6-bcm43xx-pci-neuter.patch
 Patch701: linux-2.6-drivers-ssb-debug-revision.patch
 Patch710: linux-2.6-netdev-e1000e-01.patch
@@ -1181,6 +1182,7 @@
 ApplyPatch linux-2.6-zd1211rw-mac80211.patch
 ApplyPatch linux-2.6-mac80211-extras.patch
 ApplyPatch linux-2.6-wireless-fixes.patch
+ApplyPatch linux-2.6-mac80211-decryption-noise.patch
 
 # avoid bcm3xx vs bcm43xx-mac80211 PCI ID conflicts
 ApplyPatch linux-2.6-bcm43xx-pci-neuter.patch
@@ -1868,6 +1870,9 @@
 
 
 %changelog
+* Tue Oct 23 2007 John W. Linville <linville at redhat.com>
+- quiet mac80211 decryption noise when frames may not be for us
+
 * Tue Oct 23 2007 Eric Paris <eparis at redhat.com>
 - check sigchld when waiting on a task (gdb/selinux interaction)
 




More information about the fedora-extras-commits mailing list