]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add more authentication error case debugging
authorBen Greear <greearb@candelatech.com>
Thu, 7 Dec 2017 17:14:49 +0000 (09:14 -0800)
committerJouni Malinen <j@w1.fi>
Mon, 2 Apr 2018 13:53:10 +0000 (16:53 +0300)
This can help one understand better why stations are failing
to authenticate.

Signed-off-by: Ben Greear <greearb@candelatech.com>
src/ap/ieee802_11.c

index 4394d37bf86b994535e04ee64528fbfe4361c861..6dafb900cd68e2fc0927a6b52219870c1756aa00 100644 (file)
@@ -1888,6 +1888,7 @@ static void handle_auth(struct hostapd_data *hapd,
 
                sta = ap_sta_add(hapd, mgmt->sa);
                if (!sta) {
+                       wpa_printf(MSG_DEBUG, "ap_sta_add() failed");
                        resp = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
                        goto fail;
                }
@@ -1899,6 +1900,7 @@ static void handle_auth(struct hostapd_data *hapd,
                hapd, sta, res, session_timeout, acct_interim_interval,
                &vlan_id, &psk, &identity, &radius_cui);
        if (res) {
+               wpa_printf(MSG_DEBUG, "ieee802_11_set_radius_info() failed");
                resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto fail;
        }
@@ -1967,6 +1969,9 @@ static void handle_auth(struct hostapd_data *hapd,
        case WLAN_AUTH_SHARED_KEY:
                resp = auth_shared_key(hapd, sta, auth_transaction, challenge,
                                       fc & WLAN_FC_ISWEP);
+               if (resp != 0)
+                       wpa_printf(MSG_DEBUG,
+                                  "auth_shared_key() failed: status=%d", resp);
                sta->auth_alg = WLAN_AUTH_SHARED_KEY;
                mlme_authenticate_indication(hapd, sta);
                if (sta->challenge && auth_transaction == 1) {