static void wpa_sm_sim_state_error_handler(struct wpa_supplicant *wpa_s) { int i; struct wpa_ssid *ssid; const struct eap_method_type *eap_methods; if (!wpa_s->conf) return; for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) { eap_methods = ssid->eap.eap_methods; if (!eap_methods) continue; for (i = 0; eap_methods[i].method != EAP_TYPE_NONE; i++) { if (eap_methods[i].vendor == EAP_VENDOR_IETF && (eap_methods[i].method == EAP_TYPE_SIM || eap_methods[i].method == EAP_TYPE_AKA || eap_methods[i].method == EAP_TYPE_AKA_PRIME)) { wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid); break; } } } }
void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { if (wpa_s->wpa) wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid); if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s) wpas_dbus_unregister_network(wpa_s, ssid->id); #ifdef CONFIG_P2P wpas_p2p_network_removed(wpa_s, ssid); #endif /* CONFIG_P2P */ }
void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) { if (wpa_s->next_ssid == ssid) wpa_s->next_ssid = NULL; if (wpa_s->wpa) wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid); if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s) wpas_dbus_unregister_network(wpa_s, ssid->id); wpas_p2p_network_removed(wpa_s, ssid); }
void sme_event_assoc_reject(struct wpa_supplicant *wpa_s, union wpa_event_data *data) { wpa_dbg(wpa_s, MSG_DEBUG, "SME: Association with " MACSTR " failed: " "status code %d", MAC2STR(wpa_s->pending_bssid), data->assoc_reject.status_code); eloop_cancel_timeout(sme_assoc_timer, wpa_s, NULL); #ifdef CONFIG_SAE if (wpa_s->sme.sae_pmksa_caching && wpa_s->current_ssid && wpa_key_mgmt_sae(wpa_s->current_ssid->key_mgmt)) { wpa_dbg(wpa_s, MSG_DEBUG, "PMKSA caching attempt rejected - drop PMKSA cache entry and fall back to SAE authentication"); wpa_sm_aborted_cached(wpa_s->wpa); wpa_sm_pmksa_cache_flush(wpa_s->wpa, wpa_s->current_ssid); if (wpa_s->current_bss) { struct wpa_bss *bss = wpa_s->current_bss; struct wpa_ssid *ssid = wpa_s->current_ssid; wpa_drv_deauthenticate(wpa_s, wpa_s->pending_bssid, WLAN_REASON_DEAUTH_LEAVING); wpas_connect_work_done(wpa_s); wpa_supplicant_mark_disassoc(wpa_s); wpa_supplicant_connect(wpa_s, bss, ssid); return; } } #endif /* CONFIG_SAE */ /* * For now, unconditionally terminate the previous authentication. In * theory, this should not be needed, but mac80211 gets quite confused * if the authentication is left pending.. Some roaming cases might * benefit from using the previous authentication, so this could be * optimized in the future. */ sme_deauth(wpa_s); }