diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 7f43216c6..be023c701 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -1362,7 +1362,7 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction, " auth_type=%u auth_transaction=%u status_code=%u", MAC2STR(bssid), WLAN_AUTH_SAE, auth_transaction, status_code); - return -1; + return -2; } if (auth_transaction == 1) { @@ -1513,7 +1513,10 @@ void sme_external_auth_mgmt_rx(struct wpa_supplicant *wpa_s, if (res < 0) { /* Notify failure to the driver */ sme_send_external_auth_status( - wpa_s, WLAN_STATUS_UNSPECIFIED_FAILURE); + wpa_s, + res == -2 ? + le_to_host16(header->u.auth.status_code) : + WLAN_STATUS_UNSPECIFIED_FAILURE); return; } if (res != 1)