mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-03 18:17:59 +02:00
policy: fix blocking autoconnect for no-secrets
The condition was obviosly inverted, blocking autoconnect when it should not, and not blocking it when it should. [thaller@redhat.com: modified original patch and rewrite commit message] Fixes:e2c8ef45achttps://bugzilla.gnome.org/show_bug.cgi?id=794014 (cherry picked from commitd2f019409d)
This commit is contained in:
parent
596d59bda0
commit
0824a32703
1 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue