mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 18:10:08 +01:00
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
This commit is contained in:
parent
ddfeed4530
commit
b6b7d909f7
1 changed files with 2 additions and 1 deletions
|
|
@ -1853,6 +1853,7 @@ recheck_assume_connection (NMManager *self,
|
||||||
gboolean generated = FALSE;
|
gboolean generated = FALSE;
|
||||||
NMDeviceState state;
|
NMDeviceState state;
|
||||||
NMDeviceSysIfaceState if_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_MANAGER (self), FALSE);
|
||||||
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
|
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
|
||||||
|
|
@ -1868,7 +1869,7 @@ recheck_assume_connection (NMManager *self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if_state = nm_device_sys_iface_state_get (device);
|
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));
|
nm_assert (!guess_assume && (assume_connection_uuid == NULL));
|
||||||
else if (if_state != NM_DEVICE_SYS_IFACE_STATE_EXTERNAL)
|
else if (if_state != NM_DEVICE_SYS_IFACE_STATE_EXTERNAL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue