diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-09-15 10:48:30 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-09-15 10:48:30 +0300 |
commit | 0194fedb46e660eb1e606959a1f4479077f3e7e2 (patch) | |
tree | 2f8480516a13ea4650fbfccd900a15c2d78b47d9 /wpa_supplicant/events.c | |
parent | 60b94c9819199c0427e623080ebae27fe44be6b5 (diff) | |
download | external_wpa_supplicant_8_ti-0194fedb46e660eb1e606959a1f4479077f3e7e2.zip external_wpa_supplicant_8_ti-0194fedb46e660eb1e606959a1f4479077f3e7e2.tar.gz external_wpa_supplicant_8_ti-0194fedb46e660eb1e606959a1f4479077f3e7e2.tar.bz2 |
driver_nl80211: Fix MLME key settings for static WEP
Current wpa_supplicant has a bug with WEP keys, it adds a zero-length
sequence counter field to netlink which the kernel doesn't accept.
Additionally, the kernel API slightly changed to accept keys only when
connected, so we need to send it the keys after that. For that to work
with shared key authentication, we also include the default WEP TX key
in the authentication command.
To upload the keys properly _after_ associating, add a new flag
WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE indicating that the driver
needs the keys at that point and not earlier.
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r-- | wpa_supplicant/events.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index de4c6fb..e2c7a9f 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -889,6 +889,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, u8 bssid[ETH_ALEN]; int ft_completed = wpa_ft_is_completed(wpa_s->wpa); int bssid_changed; + struct wpa_driver_capa capa; if (data) wpa_supplicant_event_associnfo(wpa_s, data); @@ -1004,6 +1005,14 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpa_s->bgscan_ssid = NULL; } #endif /* CONFIG_BGSCAN */ + + if ((wpa_s->key_mgmt == WPA_KEY_MGMT_NONE || + wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA) && + wpa_s->current_ssid && wpa_drv_get_capa(wpa_s, &capa) == 0 && + capa.flags & WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE) { + /* Set static WEP keys again */ + wpa_set_wep_keys(wpa_s, wpa_s->current_ssid); + } } |