]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Reset STA timeout_next on driver-based-SME association
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 11 Apr 2012 11:06:50 +0000 (14:06 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 11 Apr 2012 11:06:50 +0000 (14:06 +0300)
The next ap_handle_timer action was already cleared when association
is handled with user space -based SME. However, this step was missing
from the driver callback for indicating new association. This could
result in the first ap_handle_timer timeout on the new association
removing the station unexpectedly. Fix this by resetting the timeout_next
in hostapd_notif_assoc().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1

src/ap/drv_callbacks.c

index bd5b908fc996bb091e9a34889188146634210f71..8d24e087e6b0c853070c41e0c1c1f1499480efb5 100644 (file)
@@ -78,6 +78,12 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
        sta = ap_get_sta(hapd, addr);
        if (sta) {
                accounting_sta_stop(hapd, sta);
+
+               /*
+                * Make sure that the previously registered inactivity timer
+                * will not remove the STA immediately.
+                */
+               sta->timeout_next = STA_NULLFUNC;
        } else {
                sta = ap_sta_add(hapd, addr);
                if (sta == NULL)