mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 09:30:16 +01:00
manager: don't let a master device go unmanaged on a slave activation
If a slave device activates, we should keep the master up even though it
was taken over before.
This fixes an issue, where a single slave to a master would be
reactivated after a daemon restart. The daemon restart would cause the
master to be treated externally created (would go unmanaged when all the
slaves are gone) while the reactivation would leave the master without
slaves for a while.
(cherry picked from commit b605fb2712)
This commit is contained in:
parent
8b9f3055bf
commit
cd8e8ab1ca
1 changed files with 7 additions and 0 deletions
|
|
@ -3122,6 +3122,13 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError *
|
|||
}
|
||||
}
|
||||
|
||||
/* Now that we're activating a slave for that master, make sure the master just
|
||||
* decides to go unmanaged while we're activating (perhaps because other slaves
|
||||
* go away leaving him with no kids).
|
||||
*/
|
||||
nm_device_set_unmanaged_by_flags (master_device, NM_UNMANAGED_EXTERNAL_DOWN,
|
||||
NM_UNMAN_FLAG_OP_FORGET, NM_DEVICE_STATE_REASON_USER_REQUESTED);
|
||||
|
||||
nm_active_connection_set_master (active, master_ac);
|
||||
_LOGD (LOGD_CORE, "Activation of '%s' depends on active connection %p %s",
|
||||
nm_settings_connection_get_id (connection),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue