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
3 changed files with 7 additions and 7 deletions
|
@ -2149,7 +2149,7 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
|
||||||
"pre-shared key may be incorrect");
|
"pre-shared key may be incorrect");
|
||||||
if (wpas_p2p_4way_hs_failed(wpa_s) > 0)
|
if (wpas_p2p_4way_hs_failed(wpa_s) > 0)
|
||||||
return; /* P2P group removed */
|
return; /* P2P group removed */
|
||||||
wpas_auth_failed(wpa_s);
|
wpas_auth_failed(wpa_s, "WRONG_KEY");
|
||||||
}
|
}
|
||||||
if (!wpa_s->disconnected &&
|
if (!wpa_s->disconnected &&
|
||||||
(!wpa_s->auto_reconnect_disabled ||
|
(!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)) &&
|
(wpa_s->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA)) &&
|
||||||
eapol_sm_failed(wpa_s->eapol))) &&
|
eapol_sm_failed(wpa_s->eapol))) &&
|
||||||
!wpa_s->eap_expected_failure))
|
!wpa_s->eap_expected_failure))
|
||||||
wpas_auth_failed(wpa_s);
|
wpas_auth_failed(wpa_s, "AUTH_FAILED");
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
if (deauth && reason_code > 0) {
|
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) {
|
if (count > 3 && wpa_s->current_ssid) {
|
||||||
wpa_printf(MSG_DEBUG, "Continuous association failures - "
|
wpa_printf(MSG_DEBUG, "Continuous association failures - "
|
||||||
"consider temporary network disabling");
|
"consider temporary network disabling");
|
||||||
wpas_auth_failed(wpa_s);
|
wpas_auth_failed(wpa_s, "CONN_FAILED");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (count) {
|
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;
|
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||||
int dur;
|
int dur;
|
||||||
|
@ -4552,9 +4552,9 @@ void wpas_auth_failed(struct wpa_supplicant *wpa_s)
|
||||||
ssid->disabled_until.sec = now.sec + dur;
|
ssid->disabled_until.sec = now.sec + dur;
|
||||||
|
|
||||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TEMP_DISABLED
|
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->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);
|
void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
||||||
int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
|
int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
|
||||||
int wpas_is_p2p_prioritized(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,
|
void wpas_clear_temp_disabled(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_ssid *ssid, int clear_failures);
|
struct wpa_ssid *ssid, int clear_failures);
|
||||||
int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
|
||||||
|
|
Loading…
Reference in a new issue