diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index a9ff49133..8f0ed2033 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -393,7 +393,7 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s) } -static void wpa_find_assoc_pmkid(struct wpa_supplicant *wpa_s) +static void wpa_find_assoc_pmkid(struct wpa_supplicant *wpa_s, bool authorized) { struct wpa_ie_data ie; int pmksa_set = -1; @@ -417,6 +417,8 @@ static void wpa_find_assoc_pmkid(struct wpa_supplicant *wpa_s) NULL, NULL, 0, NULL, 0); if (pmksa_set == 0) { eapol_sm_notify_pmkid_attempt(wpa_s->eapol); + if (authorized) + wpa_sm_set_pmk_from_pmksa(wpa_s->wpa); break; } } @@ -3151,7 +3153,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s, if (wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, p, len)) break; found = 1; - wpa_find_assoc_pmkid(wpa_s); + wpa_find_assoc_pmkid(wpa_s, + data->assoc_info.authorized); } if (!found_x && p[0] == WLAN_EID_RSNX) { if (wpa_sm_set_assoc_rsnxe(wpa_s->wpa, p, len))