From 4985ca5ada9b9c24118b57c3288c5aa37c38ab81 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 28 Mar 2018 17:26:57 +0200 Subject: manager: allow autoconnect-slaves to reconnect the same connection 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 --- src/nm-manager.c | 8 +++++--- 1 file 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) -- cgit v1.2.1