diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-03-28 17:26:57 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-04-08 09:40:14 +0200 |
commit | 4985ca5ada9b9c24118b57c3288c5aa37c38ab81 (patch) | |
tree | 2b21f31bf9af100b519b930597afe9077e9db322 | |
parent | 43a0f47ea20b4a55dac9d914c76fff67d9b3d750 (diff) | |
download | NetworkManager-bg/autoconnect-slaves-rh1548265.tar.gz |
manager: allow autoconnect-slaves to reconnect the same connectionbg/autoconnect-slaves-rh1548265
When a master connection is activated and has autoconnect-slaves=yes,
we want to reactivate an existing slave connection even if it is
already active.
https://bugzilla.redhat.com/show_bug.cgi?id=1548265
-rw-r--r-- | src/nm-manager.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 7a07ac5b71..4bc5c5dd9a 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -4032,13 +4032,15 @@ _internal_activation_auth_done (NMActiveConnection *active, priv->authorizing_connections = g_slist_remove (priv->authorizing_connections, active); - /* Don't continue with the activation if an equivalent active connection - * already exists. We also check this earlier, but there we may fail to + /* Don't continue with an internal activation if an equivalent active + * connection already exists. Note that slave autoconnections always force a + * reconnection. We also check this earlier, but there we may fail to * detect a duplicate if the existing active connection is undergoing * authorization in impl_manager_activate_connection(). */ if ( success - && nm_auth_subject_is_internal (nm_active_connection_get_subject (active))) { + && nm_auth_subject_is_internal (nm_active_connection_get_subject (active)) + && nm_active_connection_get_activation_reason (active) != NM_ACTIVATION_REASON_AUTOCONNECT_SLAVES) { c_list_for_each_entry (ac, &priv->active_connections_lst_head, active_connections_lst) { if ( nm_active_connection_get_device (ac) == nm_active_connection_get_device (active) && nm_active_connection_get_settings_connection (ac) == nm_active_connection_get_settings_connection (active) |