From 0e22b8dd4cb0876e6db013cd26779492783e5332 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 28 Dec 2013 19:18:47 +0200 Subject: [PATCH] WPS: Make sure reconfiguration timeout is not left behind on deinit 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 --- src/ap/wps_hostapd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c index dd97b1240..9edf0f5dc 100644 --- a/src/ap/wps_hostapd.c +++ b/src/ap/wps_hostapd.c @@ -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