]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Disconnect before starting reconfiguration
authorJouni Malinen <jouni@codeaurora.org>
Thu, 13 Aug 2020 14:05:49 +0000 (17:05 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 13 Aug 2020 14:05:49 +0000 (17:05 +0300)
The offchannel operations (scan, Public Action frame TX/RX) have
significantly more latency when performed while connected, so disconnect
when requested to initiate DPP reconfiguration to avoid this. The old
network profile (i.e., likely the current connection) is going to be
replaced in practice and as such, there is no need to try continue that
association any further.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/dpp_supplicant.c

index 7d226ac76bdd9549a8c88bfce14cfab5742d0bf5..6dc0002eb1689bb3bc793f1c9c5daa0f8f729fa0 100644 (file)
@@ -3690,6 +3690,12 @@ int wpas_dpp_reconfig(struct wpa_supplicant *wpa_s, const char *cmd)
                           "DPP: Failed to generate E-id for reconfiguration");
                return -1;
        }
+       if (wpa_s->wpa_state >= WPA_AUTHENTICATING) {
+               wpa_printf(MSG_DEBUG, "DPP: Disconnect for reconfiguration");
+               wpa_s->own_disconnect_req = 1;
+               wpa_supplicant_deauthenticate(
+                       wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+       }
        wpas_dpp_chirp_stop(wpa_s);
        wpa_s->dpp_allowed_roles = DPP_CAPAB_ENROLLEE;
        wpa_s->dpp_qr_mutual = 0;