]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Avoid sending client probe on removed client
authorPeter Oh <poh@qca.qualcomm.com>
Mon, 9 Feb 2015 21:23:53 +0000 (13:23 -0800)
committerJouni Malinen <j@w1.fi>
Tue, 10 Feb 2015 20:21:03 +0000 (22:21 +0200)
Sending client probe on already removed client from kernel driver does
not have any benefit and may lead unintended behavior among variable
drivers (mac80211 has a WARN_ON() that could have been triggered after
ifconfig down+up earlier when hostapd did not re-enable beaconing on
ifup). Skip this step in discussion when the kernel driver reports that
client entry is removed.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
src/ap/sta_info.c

index eebaa3ce6227eab43c6fc27242d730eed70ff37a..7e75e1a61e1ae3f7e87657e7521a24a5abf226e5 100644 (file)
@@ -375,8 +375,9 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
                                "Station " MACSTR " has lost its driver entry",
                                MAC2STR(sta->addr));
 
-                       if (hapd->conf->skip_inactivity_poll)
-                               sta->timeout_next = STA_DISASSOC;
+                       /* Avoid sending client probe on removed client */
+                       sta->timeout_next = STA_DISASSOC;
+                       goto skip_poll;
                } else if (inactive_sec < hapd->conf->ap_max_inactivity) {
                        /* station activity detected; reset timeout state */
                        wpa_msg(hapd->msg_ctx, MSG_DEBUG,
@@ -409,6 +410,7 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
                next_time = hapd->conf->ap_max_inactivity;
        }
 
+skip_poll:
        if (next_time) {
                wpa_printf(MSG_DEBUG, "%s: register ap_handle_timer timeout "
                           "for " MACSTR " (%lu seconds)",