mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 09:20:23 +01:00
core: merge branch 'dracut_rhel9_test'
core: don't reset assume state if the device is unmanaged by parent https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1048
This commit is contained in:
commit
e6bd98cc07
1 changed files with 6 additions and 4 deletions
|
|
@ -2848,9 +2848,10 @@ recheck_assume_connection(NMManager *self, NMDevice *device)
|
|||
g_return_val_if_fail(NM_IS_DEVICE(device), FALSE);
|
||||
|
||||
if (!nm_device_get_managed(device, FALSE)) {
|
||||
/* If the device is only unmanaged by NM_UNMANAGED_PLATFORM_INIT,
|
||||
/* If the device is unmanaged by NM_UNMANAGED_PLATFORM_INIT or NM_UNMANAGED_PARENT,
|
||||
* don't reset the state now but wait until it becomes managed. */
|
||||
if (nm_device_get_unmanaged_flags(device, NM_UNMANAGED_ALL) != NM_UNMANAGED_PLATFORM_INIT)
|
||||
if (nm_device_get_unmanaged_flags(device, NM_UNMANAGED_ALL)
|
||||
& ~(NM_UNMANAGED_PLATFORM_INIT | NM_UNMANAGED_PARENT))
|
||||
nm_device_assume_state_reset(device);
|
||||
_LOG2D(LOGD_DEVICE, device, "assume: don't assume because %s", "not managed");
|
||||
return FALSE;
|
||||
|
|
@ -3173,9 +3174,10 @@ _device_realize_finish(NMManager *self, NMDevice *device, const NMPlatformLink *
|
|||
nm_device_realize_finish(device, plink);
|
||||
|
||||
if (!nm_device_get_managed(device, FALSE)) {
|
||||
/* If the device is only unmanaged by NM_UNMANAGED_PLATFORM_INIT,
|
||||
/* If the device is unmanaged by NM_UNMANAGED_PLATFORM_INIT or NM_UNMANAGED_PARENT,
|
||||
* don't reset the state now but wait until it becomes managed. */
|
||||
if (nm_device_get_unmanaged_flags(device, NM_UNMANAGED_ALL) != NM_UNMANAGED_PLATFORM_INIT)
|
||||
if (nm_device_get_unmanaged_flags(device, NM_UNMANAGED_ALL)
|
||||
& ~(NM_UNMANAGED_PLATFORM_INIT | NM_UNMANAGED_PARENT))
|
||||
nm_device_assume_state_reset(device);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue