Search Linux Wireless

WEP and enc restricted

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

 



Hi,

I am pretty sure that the mac80211 code doesn't handle WEP with shared keys correctly. Using the ath9k driver on my MacBook I am unable to put the driver into restricted mode (shared key). It stays in open mode. That is the following command has no effect: iwconfig wlan0 enc restricted. I can also confirm this when looking at the authentication packets that go over the air: they are sent with the open flag, and not the shared key flag.

Surprisingly nowhere in the mac80211 code the ifsta->auth_alg is set to WLAN_AUTH_SHARED_KEY so far. The attached small patch does just that. I am not 100% sure if that's the way to do it, so please review carefully.

With this patch authentication works. The AP now denies association, but that is another problem.

Cheers

Ortwin
--- wext.c.orig	2008-07-21 22:18:29.000000000 +0200
+++ wext.c	2008-09-14 16:46:09.000000000 +0200
@@ -929,6 +929,14 @@
 	else
 		idx--;
 
+	if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
+		struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+		if (erq->flags & IW_ENCODE_OPEN)
+			ifsta->auth_alg = WLAN_AUTH_OPEN;
+		else if (erq->flags & IW_ENCODE_RESTRICTED)
+			ifsta->auth_alg = WLAN_AUTH_SHARED_KEY;
+	}
+
 	if (erq->flags & IW_ENCODE_DISABLED)
 		remove = 1;
 	else if (erq->length == 0) {

[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