summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>2020-05-15 12:40:39 +0200
committerThomas Haller <thaller@redhat.com>2020-06-03 18:29:12 +0200
commit440a5c03b37557c9708dcafc62e846b37c8e3a01 (patch)
treefc2a390e21fb3085ca5d10f08fac5e6ffb20b4f1
parentfcfc12d50fb566bfa46abc64788aaecf3ce464f2 (diff)
downloadNetworkManager-440a5c03b37557c9708dcafc62e846b37c8e3a01.tar.gz
settings: unblock autoconnect on new secrets
When the secrets for a connection are updated, unblock autoconnection in case it had been blocked previously due to bad or no secrets. Otherwise we would need to manually activate the connection or restart NM to get another try with the new secrets.
-rw-r--r--src/settings/nm-settings-connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 37a4025863..653a80c992 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -1492,6 +1492,12 @@ update_auth_cb (NMSettingsConnection *self,
* they're in the main connection.
*/
update_agent_secrets_cache (self, info->new_settings);
+
+ /* New secrets, allow autoconnection again */
+ if ( nm_settings_connection_autoconnect_blocked_reason_set (self, NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_NO_SECRETS, FALSE)
+ && !nm_settings_connection_autoconnect_blocked_reason_get (self, 0)) {
+ nm_settings_connection_autoconnect_retries_reset (self);
+ }
}
}