mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
Send authentication failure reason in wpas_auth_failed()
"WRONG_KEY" - possibly wrong psk "AUTH_FAILED" - authentication failure "CONN_FAILED" - continiuos connection failure Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
5cd0e228ac
commit
b19c098e75
@ -2149,7 +2149,7 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
|
||||
"pre-shared key may be incorrect");
|
||||
if (wpas_p2p_4way_hs_failed(wpa_s) > 0)
|
||||
return; /* P2P group removed */
|
||||
wpas_auth_failed(wpa_s);
|
||||
wpas_auth_failed(wpa_s, "WRONG_KEY");
|
||||
}
|
||||
if (!wpa_s->disconnected &&
|
||||
(!wpa_s->auto_reconnect_disabled ||
|
||||
@ -2607,7 +2607,7 @@ static void wpas_event_disconnect(struct wpa_supplicant *wpa_s, const u8 *addr,
|
||||
(wpa_s->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA)) &&
|
||||
eapol_sm_failed(wpa_s->eapol))) &&
|
||||
!wpa_s->eap_expected_failure))
|
||||
wpas_auth_failed(wpa_s);
|
||||
wpas_auth_failed(wpa_s, "AUTH_FAILED");
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (deauth && reason_code > 0) {
|
||||
|
@ -4333,7 +4333,7 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid)
|
||||
if (count > 3 && wpa_s->current_ssid) {
|
||||
wpa_printf(MSG_DEBUG, "Continuous association failures - "
|
||||
"consider temporary network disabling");
|
||||
wpas_auth_failed(wpa_s);
|
||||
wpas_auth_failed(wpa_s, "CONN_FAILED");
|
||||
}
|
||||
|
||||
switch (count) {
|
||||
@ -4498,7 +4498,7 @@ int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
|
||||
void wpas_auth_failed(struct wpa_supplicant *wpa_s)
|
||||
void wpas_auth_failed(struct wpa_supplicant *wpa_s, char *reason)
|
||||
{
|
||||
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||
int dur;
|
||||
@ -4552,9 +4552,9 @@ void wpas_auth_failed(struct wpa_supplicant *wpa_s)
|
||||
ssid->disabled_until.sec = now.sec + dur;
|
||||
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TEMP_DISABLED
|
||||
"id=%d ssid=\"%s\" auth_failures=%u duration=%d",
|
||||
"id=%d ssid=\"%s\" auth_failures=%u duration=%d reason=%s",
|
||||
ssid->id, wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
|
||||
ssid->auth_failures, dur);
|
||||
ssid->auth_failures, dur, reason);
|
||||
}
|
||||
|
||||
|
||||
|
@ -933,7 +933,7 @@ void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s);
|
||||
void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
||||
int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
|
||||
int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s);
|
||||
void wpas_auth_failed(struct wpa_supplicant *wpa_s);
|
||||
void wpas_auth_failed(struct wpa_supplicant *wpa_s, char *reason);
|
||||
void wpas_clear_temp_disabled(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_ssid *ssid, int clear_failures);
|
||||
int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
||||
|
Loading…
Reference in New Issue
Block a user