madwifi session timeout issue
Ahmet Basagalar
ahmet
Tue Nov 14 16:28:59 PST 2006
I have noticed that session timeout was not working properly with hostapd
and madwifi driver. The reason is because WLAN_STA_AUTH flag is not being
set on madwifi_new_sta function.
Also data counters was not being updated on radius after a session timeout.
This looks like to the fact that station is deauthenticated before polling
the counters from madwifi. So I have modified ap_handle_session_timer as
follows:
void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx)
{
hostapd *hapd = eloop_ctx;
struct sta_info *sta = timeout_ctx;
u8 addr[ETH_ALEN];
if (!(sta->flags & WLAN_STA_AUTH))
return;
memcpy(addr,sta->addr,ETH_ALEN);
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
"session timeout");
sta->acct_terminate_cause =
RADIUS_ACCT_TERMINATE_CAUSE_SESSION_TIMEOUT;
ap_free_sta(hapd, sta);
hostapd_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
}
After this modification, session timeouts started to work fine.
Ahmet
More information about the Hostap
mailing list