summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/supplicant.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index d0357f33..867a9282 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -2318,6 +2318,13 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
/* carrier off */
connman_network_set_connected(task->network, FALSE);
+ /*
+ * Reset the passphrase if we're being disconnected before
+ * association/handshake completes.
+ */
+ if (prevstate != WPA_COMPLETED && state == WPA_DISCONNECTED)
+ connman_network_set_passphrase(task->network, NULL);
+
if (task->disconnecting == TRUE) {
connman_network_unref(task->network);
task->disconnecting = FALSE;