[PATCH 4/4] hostap: Improve disconnect & timeout related logging.
greearb at candelatech.com
greearb
Mon Oct 24 12:09:39 PDT 2011
From: Ben Greear <greearb at candelatech.com>
This previously helped when debugging some auth issues
when hitting the AP with 128 association attempts all
at once.
Signed-off-by: Ben Greear <greearb at candelatech.com>
---
:100644 100644 af535d8... 3900f01... M src/ap/ieee802_1x.c
:100644 100644 d82b9ce... 46674be... M src/ap/sta_info.c
:100644 100644 e63ee90... 4f5222e... M src/ap/wpa_auth.c
src/ap/ieee802_1x.c | 3 +++
src/ap/sta_info.c | 9 +++++----
src/ap/wpa_auth.c | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index af535d8..3900f01 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -1423,6 +1423,9 @@ void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta)
* request and we cannot continue EAP processing (EAP-Failure
* could only be sent if the EAP peer actually replied).
*/
+ wpa_dbg(hapd, MSG_DEBUG, "EAP Timeout, STA " MACSTR,
+ MAC2STR(sta->addr));
+
sm->eap_if->portEnabled = FALSE;
ap_sta_disconnect(hapd, sta, sta->addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index d82b9ce..46674be 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -326,9 +326,10 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
} else if (sta->timeout_next != STA_REMOVE) {
int deauth = sta->timeout_next == STA_DEAUTH;
- wpa_printf(MSG_DEBUG, "Sending %s info to STA " MACSTR,
- deauth ? "deauthentication" : "disassociation",
- MAC2STR(sta->addr));
+ wpa_dbg(hapd, MSG_DEBUG,
+ "Timeout, Sending %s info to STA " MACSTR,
+ deauth ? "deauthentication" : "disassociation",
+ MAC2STR(sta->addr));
if (deauth) {
hostapd_drv_sta_deauth(
@@ -368,7 +369,7 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
case STA_REMOVE:
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
- "inactivity");
+ "inactivity (timer DEAUTH/REMOVE)");
if (!sta->acct_terminate_cause)
sta->acct_terminate_cause =
RADIUS_ACCT_TERMINATE_CAUSE_IDLE_TIMEOUT;
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index e63ee90..4f5222e 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -194,6 +194,8 @@ static void wpa_sta_disconnect(struct wpa_authenticator *wpa_auth,
{
if (wpa_auth->cb.disconnect == NULL)
return;
+ wpa_printf(MSG_DEBUG, "wpa_sta_disconnect, STA: " MACSTR,
+ MAC2STR(addr));
wpa_auth->cb.disconnect(wpa_auth->cb.ctx, addr,
WLAN_REASON_PREV_AUTH_NOT_VALID);
}
--
1.7.3.4
More information about the Hostap
mailing list