]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Fix lookup of cached PMKSA
authorPartha Narasimhan <parthan@gmail.com>
Sat, 16 Mar 2013 10:45:31 +0000 (12:45 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 16 Mar 2013 10:45:31 +0000 (12:45 +0200)
This fixes the lookup of a usable PMKSA entry in the cache. Using
wpa_s->current_ssid often returns nothing when a usable PMKSA exists in
the cache since wpa_s->current_ssid does not necessarily point to the
correct network entry at this point in time (prior to association).

Signed-hostap: Partha Narasimhan <parthan@gmail.com>

wpa_supplicant/wpa_supplicant.c

index da1a19c7a0dd4a8c8e1e5279ff3d16f45e099066..23e2da2f20153e6fac6a9b98077f6b30c62d4728 100644 (file)
@@ -1352,8 +1352,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
                                     ssid->proactive_key_caching) &&
                        (ssid->proto & WPA_PROTO_RSN);
                if (pmksa_cache_set_current(wpa_s->wpa, NULL, bss->bssid,
-                                           wpa_s->current_ssid,
-                                           try_opportunistic) == 0)
+                                           ssid, try_opportunistic) == 0)
                        eapol_sm_notify_pmkid_attempt(wpa_s->eapol, 1);
                wpa_ie_len = sizeof(wpa_ie);
                if (wpa_supplicant_set_suites(wpa_s, bss, ssid,