]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Stop SA Query on disconnection
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 3 Apr 2019 15:17:14 +0000 (18:17 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2019 21:48:27 +0000 (00:48 +0300)
SA Query wasn't stopped after disconnection, which could potentially
result in an unexpected SA timeout firing later when already connected
to another AP. Fix that by stopping SA Query when an association is
terminated.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/sme.c

index 9258a3baac32a87d7f5eff0630fbb01d13e6f621..383f858a0a64eb2c601c48ba96769319eca8a723 100644 (file)
@@ -1985,6 +1985,9 @@ void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s)
        if (wpa_s->sme.ft_ies || wpa_s->sme.ft_used)
                sme_update_ft_ies(wpa_s, NULL, NULL, 0);
 #endif /* CONFIG_IEEE80211R */
+#ifdef CONFIG_IEEE80211W
+       sme_stop_sa_query(wpa_s);
+#endif /* CONFIG_IEEE80211W */
 }
 
 
@@ -1993,9 +1996,6 @@ void sme_deinit(struct wpa_supplicant *wpa_s)
        os_free(wpa_s->sme.ft_ies);
        wpa_s->sme.ft_ies = NULL;
        wpa_s->sme.ft_ies_len = 0;
-#ifdef CONFIG_IEEE80211W
-       sme_stop_sa_query(wpa_s);
-#endif /* CONFIG_IEEE80211W */
        sme_clear_on_disassoc(wpa_s);
 
        eloop_cancel_timeout(sme_assoc_timer, wpa_s, NULL);