[PATCH] Remove inactivity timeout for wired interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We should unconditionally remove inactivity timers for wired network cases.
This patch 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 "cancel wired" 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: cancel wired ap_handle_timer
timeout for 00:02:00:00:00:07 (120 seconds - ap_max_inactivity)

This was tested on a debian jessie amd64 system with a configured 120 second
inactivity timer and the session did not timeout.

Thanks,
Sam Tannous
Cumulus Networks

Signed-off-by: Sam Tannous <stannous@xxxxxxxxxxxxxxxxxxx>
---
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 9fafc7f..1717817 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2834,7 +2834,14 @@ 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) {
+               wpa_printf(MSG_DEBUG,
+                          "%s: %s: cancel wired ap_handle_timer timeout for "
+                          MACSTR " (%d seconds - ap_max_inactivity)",
+                          hapd->conf->iface, __func__, MAC2STR(sta->addr),
+                          hapd->conf->ap_max_inactivity);
+               eloop_cancel_timeout(ap_handle_timer, hapd, sta);
+       } 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)",

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux