From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Fix setting the autoconnect block reason

device_state_changed only sets the autoconnect block reason if:
- The impossible happens (con_v can never be 0, except for integer overflows)
- The agent version id is now different, which means that new agents registered
  meanwhile

That's the opposite of what we need. It leads to only setting the blocked state
if a race condition got detected.

With this patch, the block reason is only set if the agent version id stayed
the same, which means that no agents registered in between.

Index: NetworkManager-1.10.4/src/nm-policy.c
===================================================================
--- NetworkManager-1.10.4.orig/src/nm-policy.c
+++ NetworkManager-1.10.4/src/nm-policy.c
@@ -1760,8 +1760,7 @@ device_state_changed (NMDevice *device,
 				 * We detect this by using a version-id of the agent-manager, which increments
 				 * whenever new agents register. */
 				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))
+				if (con_v == nm_agent_manager_get_agent_version_id (priv->agent_mgr))
 					block_no_secrets = TRUE;
 			}
 
