From 3e2fce288aee2dd012c5d7af8aaa4e59b2e5e747 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 14 Jan 2016 12:01:54 +0100 Subject: [PATCH] device: use the REMOVED reason when unmanaging the device while quitting With the final removal the reason of NOW_UNMANAGED causes the cleanup on the device to be run, which downs the device: #0 nm_platform_link_set_down (self=0x555555a29bb0, ifindex=1711) at platform/nm-platform.c:1111 #1 0x00005555555d6ccf in nm_device_take_down (self=self@entry=0x555555c07c70, block=block@entry=1) at devices/nm-device.c:8175 #2 0x00005555555df0c7 in _set_state_full (self=0x555555c07c70, state=NM_DEVICE_STATE_UNMANAGED, reason=NM_DEVICE_STATE_REASON_NOW_UNMANAGED, quitting=quitting@entry=0) at devices/nm-device.c:9825 #3 0x00005555555dfa97 in nm_device_state_changed (self=, state=, reason=) at devices/nm-device.c:10084 #4 0x00005555555e472c in nm_device_set_unmanaged_flags (self=, flag=flag@entry=NM_UNMANAGED_INTERNAL, unmanaged=unmanaged@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_NOW_UNMANAGED) at devices/nm-device.c:8745 #5 0x00005555555e54a9 in nm_device_set_unmanaged_quitting (self=) at devices/nm-device.c:8806 #6 0x000055555565b1aa in remove_device (manager=manager@entry=0x555555a4a2c0, device=0x555555c07c70, quitting=quitting@entry=1, allow_unmanage=allow_unmanage@entry=1) at nm-manager.c:833 #7 0x0000555555660b81 in nm_manager_stop (self=0x555555a4a2c0) at nm-manager.c:4389 #8 0x00005555555b3f9b in main (argc=1, argv=0x7fffffffdba8) at main.c:493 --- src/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 3dbad5e109..f8f5b37f4f 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8808,7 +8808,7 @@ nm_device_set_unmanaged_quitting (NMDevice *self) nm_device_set_unmanaged_flags (self, NM_UNMANAGED_INTERNAL, TRUE, - NM_DEVICE_STATE_REASON_NOW_UNMANAGED); + NM_DEVICE_STATE_REASON_REMOVED); } /*****************************************************************************/