From e06aaba1ca36209480845fcb74fd80875a95d3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Wed, 22 Oct 2025 13:23:37 +0200 Subject: [PATCH] core: mark as managed-type=removed when unrealize This is needed to ensure that the right CleanupType is chosen when calling to nm_device_state_changed() a bit later. With this change CLEANUP_TYPE_REMOVED will be used instead of CLEANUP_TYPE_DECONFIGURE, which is wrong because the device has already disappeared. --- src/core/devices/nm-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 86cef32f60..69f4ddb6c9 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -8678,6 +8678,8 @@ nm_device_unrealize(NMDevice *self, gboolean remove_resources, GError **error) g_object_thaw_notify(G_OBJECT(self)); + nm_device_managed_type_set(self, NM_DEVICE_MANAGED_TYPE_REMOVED); + nm_device_set_unmanaged_flags(self, NM_UNMANAGED_PLATFORM_INIT, TRUE); nm_device_set_unmanaged_flags(self,