Remove inactivity timeout for wired interfaces
We should unconditionally remove inactivity timers for wired network cases. This commit checks for this after a new station association: hapd->iface->drv_flags & WPA_DRIVER_FLAGS_WIRED and then cancels the timeout and does not register a new one. It prints out a debug message like this: 1476740180.276286: IEEE 802.1X: 00:02:00:00:00:07 CTRL_DIR entering state FORCE_BOTH 1476740180.276295: hostapd_new_assoc_sta: canceled wired ap_handle_timer timeout for 00:02:00:00:00:07 This was tested on a debian jessie amd64 system with a configured 120 second inactivity timer and the session did not timeout. Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
This commit is contained in:
parent
57f93d6889
commit
08032c7418
1 changed files with 10 additions and 1 deletions
|
@ -2832,7 +2832,16 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
} else
|
||||
wpa_auth_sta_associated(hapd->wpa_auth, sta->wpa_sm);
|
||||
|
||||
if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_INACTIVITY_TIMER)) {
|
||||
if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_WIRED) {
|
||||
if (eloop_cancel_timeout(ap_handle_timer, hapd, sta) > 0) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"%s: %s: canceled wired ap_handle_timer timeout for "
|
||||
MACSTR,
|
||||
hapd->conf->iface, __func__,
|
||||
MAC2STR(sta->addr));
|
||||
}
|
||||
} else if (!(hapd->iface->drv_flags &
|
||||
WPA_DRIVER_FLAGS_INACTIVITY_TIMER)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"%s: %s: reschedule ap_handle_timer timeout for "
|
||||
MACSTR " (%d seconds - ap_max_inactivity)",
|
||||
|
|
Loading…
Reference in a new issue