manager: avoid generating in memory connections during startup for managed devices
Commit #acf1067a allowed to assume connections on already managed devices. Anyway, in complex scenario with layered connections, during the startup of NetworkManager, this could interfere with the connection assumption based on saved state. So, avoid to re-assume connections on already managed devices during startup. Fixes:acf1067a45
(cherry picked from commitb6b7d909f7
)
This commit is contained in:
@@ -1853,6 +1853,7 @@ recheck_assume_connection (NMManager *self,
|
||||
gboolean generated = FALSE;
|
||||
NMDeviceState state;
|
||||
NMDeviceSysIfaceState if_state;
|
||||
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
|
||||
|
||||
g_return_val_if_fail (NM_IS_MANAGER (self), FALSE);
|
||||
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
|
||||
@@ -1868,7 +1869,7 @@ recheck_assume_connection (NMManager *self,
|
||||
return FALSE;
|
||||
|
||||
if_state = nm_device_sys_iface_state_get (device);
|
||||
if (if_state == NM_DEVICE_SYS_IFACE_STATE_MANAGED)
|
||||
if (!priv->startup && (if_state == NM_DEVICE_SYS_IFACE_STATE_MANAGED))
|
||||
nm_assert (!guess_assume && (assume_connection_uuid == NULL));
|
||||
else if (if_state != NM_DEVICE_SYS_IFACE_STATE_EXTERNAL)
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user