|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Changing WEP keys without resetting the NIC
From: Matthew R. Dempsky (mrd
alkemio.org)
Date: Sat Sep 02 2006 - 11:14:59 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I just hacked the FreeBSD backend of wpa_supplicant enough to connect
my OpenBSD laptop to my university's wireless network (just Dynamic
WEP, not TKIP or CCMP). I also had to add an ugly hack to
dev/ic/rt2560.c to ignore ENETRESET when issuing a SIOCS80211NWKEY
ioctl(2) (see below).
The patch works for my needs, but I'm not familiar enough with 802.11
to know if there are any cases where changing a WEP key necessitates a
reset.
Would it be better if the no-reset behavior had to be explicitly
requested in the ioctl(2)? (I was thinking perhaps adding an extra
IEEE80211_C_DYNAMICWEP capability bit for devices to provide, and
changing ieee80211_ioctl to check for this capability and to return a
different value if i_wepon has a IEEE80211_NWKEY_DYNAMIC bit set.)
Thanks.
--- dev/ic/rt2560.c~ Sat Sep 2 09:18:46 2006
+++ dev/ic/rt2560.c Sat Sep 2 09:19:13 2006

-2153,6 +2153,13 
}
break;
+ case SIOCS80211NWKEY:
+ /* Allow key changes without resetting. */
+ error = ieee80211_ioctl(ifp, cmd, data);
+ if (error == ENETRESET)
+ error = 0;
+ break;
+
default:
error = ieee80211_ioctl(ifp, cmd, data);
}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]