about summary refs log tree commit diff
path: root/src/nm-policy.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-03-13 01:29:54 +0100
committerMichael Biebl <biebl@debian.org>2018-03-13 01:29:54 +0100
commit7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (patch)
treee48e88b177182607488bcfd2d2645dbc77276866 /src/nm-policy.c
parent50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff)
New upstream version 1.10.6 upstream/1.10.6
Diffstat (limited to 'src/nm-policy.c')
-rw-r--r--src/nm-policy.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 4d0ef91a..b73e04cb 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1758,10 +1758,16 @@ device_state_changed (NMDevice *device,
 				 * been consulted, and it may be able to provide the secrets.
 				 *
 				 * We detect this by using a version-id of the agent-manager, which increments
-				 * whenever new agents register. */
+				 * whenever new agents register. Note that the agent-manager's version-id is
+				 * never zero and strictly increasing.
+				 *
+				 * A connection's version-id of zero means that the connection never tried to request secrets.
+				 * That can happen when nm_settings_connection_get_secrets() fails early without actually
+				 * consulting any agents.
+				 */
 				con_v = nm_settings_connection_get_last_secret_agent_version_id (connection);
 				if (   con_v == 0
-				    || con_v != nm_agent_manager_get_agent_version_id (priv->agent_mgr))
+				    || con_v == nm_agent_manager_get_agent_version_id (priv->agent_mgr))
 					block_no_secrets = TRUE;
 			}