wpa_supplicant 0.4.6, ndiswrapper 1.6, static wep fails
Jason Lunz
lunz
Sun Jan 29 13:34:01 PST 2006
listmember at orkun.us said:
> Problem: Calling wpa_drv_associate() in wpa_supplicant_associate()
> clears static WEP keys while using ndiswrapper driver.
>
> wpa_supplicant_associate() has a provision to reset wep key again after
> wpa_drv_associate() but because ndisdriver does not implement get_capa
> operation which is used to test for the
> WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC flag, the keys are not reset properly.
>
> I've hacked wpa_supplicant.c as follows to get it working for me. This
> is probably not the right way to fix this issue in general. I guess
> ndiswrapper needs to support a get_capa operation which returns this
> flag (also other capabilities correctly). Is it too bad to aways reset
> the static wep keys and drop WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC
> completely?
>
> Best regards,
> Tolunay
>
> --- wpa_supplicant.c.orig 2005-12-02 15:48:21.000000000 -0600
> +++ wpa_supplicant.c 2005-12-02 16:04:11.000000000 -0600
> @@ -1245,8 +1245,8 @@
> wpa_supplicant_req_auth_timeout(wpa_s, 5, 0);
> }
>
> - if (wep_keys_set && wpa_drv_get_capa(wpa_s, &capa) == 0 &&
> - capa.flags & WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC) {
> + if (wep_keys_set /* && wpa_drv_get_capa(wpa_s, &capa) == 0 &&
> + capa.flags & WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC */) {
> /* Set static WEP keys again */
> int i;
> for (i = 0; i < NUM_WEP_KEYS; i++) {
I'm having the same problem, and I'd like to fix it. What's the correct
way to add WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC to the driver's
capa.flags?
I'm using "wpasupplicant -D wext" with ndiswrapper 1.8-rc1 and
wpasupplicant 0.4.6, and it works fine except for the above problem.
driver_wext.c does not set WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC, but
ndiswrapper requires it.
driver_ndiswrapper.c does set it, but it doesn't work for me. [should
there be a note that -D ndiswrapper is only for older versions of
ndiswrapper or something?]
what's the correct way to add support for this? I looked at the WE
interface in wireless_copy.h to see if I could get ndiswrapper to export
some information to let driver_wext.c know it should set
WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC, but there doesn't seem to be a
suitable place.
alternately, am I supposed to be using "-D ndiswrapper"? If so I'll have
to go see why it isn't working for me. But it seems better to be using
the generic wext support.
Jason
More information about the Hostap
mailing list