WPS: Make sure reconfiguration timeout is not left behind on deinit
authorJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 17:18:47 +0000 (19:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Dec 2013 08:00:32 +0000 (10:00 +0200)
Even though this is a short timeout, it is at least theoretically
possible for the interface to be removed while waiting for
reconfiguration to start. Avoid issues with this by cancelling the
timeout on any WPS interface deinit. In theory, this should be postponed
until interface removal, but that does not fit very nicely to the
current wps_hostapd.c style.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/wps_hostapd.c

index dd97b12..9edf0f5 100644 (file)
@@ -1240,6 +1240,7 @@ void hostapd_deinit_wps(struct hostapd_data *hapd)
 {
        eloop_cancel_timeout(hostapd_wps_reenable_ap_pin, hapd, NULL);
        eloop_cancel_timeout(hostapd_wps_ap_pin_timeout, hapd, NULL);
+       eloop_cancel_timeout(wps_reload_config, hapd->iface, NULL);
        if (hapd->wps == NULL)
                return;
 #ifdef CONFIG_WPS_UPNP