PERFORCE change 39616 for review

Sam Leffler sam at FreeBSD.org
Sun Oct 12 20:25:17 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=39616

Change 39616 by sam at sam_ebb on 2003/10/12 20:25:14

	Reduce per-packet overhead when using WEP by using
	an advancing IV seeded with arc4random rather than
	calling arc4random for each packet.  Note this is the
	same algorithm used to select the IV when doing WEP
	on the host.

Affected files ...

.. //depot/projects/netperf/sys/dev/ath/if_ath.c#18 edit

Differences ...

==== //depot/projects/netperf/sys/dev/ath/if_ath.c#18 (text+ko) ====

@@ -1735,7 +1735,14 @@
 		 * So we use pseudo random IV for now, though it is not the
 		 * right way.
 		 */
-		iv = arc4random();
+                iv = ic->ic_iv;
+		/*
+		 * Skip 'bad' IVs from Fluhrer/Mantin/Shamir:
+		 * (B, 255, N) with 3 <= B < 8
+		 */
+		if (iv >= 0x03ff00 && (iv & 0xf8ff00) == 0x00ff00)
+			iv += 0x000100;
+		ic->ic_iv = iv + 1;
 		for (i = 0; i < IEEE80211_WEP_IVLEN; i++) {
 			ivp[i] = iv;
 			iv >>= 8;


More information about the p4-projects mailing list