From c61c552077e357c001791735392432dc87b97aa3 Mon Sep 17 00:00:00 2001 From: Jonathan Kang Date: Tue, 20 Aug 2024 15:50:13 +0800 Subject: [PATCH] device: don't enforce IP cleanup on deactivating state Don't enforce IP cleanup when devices are in deactivating state, to make sure that network connection is still available for pre-down dispatcher phase. Fixes ac4e63ddda6f ('ip: support dhcp-send-release in NMSettingIpConfig') https://bugzilla.suse.com/show_bug.cgi?id=1228154 --- src/core/devices/nm-device.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 82141ce00..ea6fea2b8 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -16893,10 +16893,6 @@ _set_state_full(NMDevice *self, NMDeviceState state, NMDeviceStateReason reason, _cleanup_ip_pre(self, AF_INET6, CLEANUP_TYPE_DECONFIGURE, FALSE); } break; - case NM_DEVICE_STATE_DEACTIVATING: - /* If we are now deactivating we should enforce IP cleanup. */ - _cleanup_ip_pre(self, AF_INET, CLEANUP_TYPE_DECONFIGURE, FALSE); - _cleanup_ip_pre(self, AF_INET6, CLEANUP_TYPE_DECONFIGURE, FALSE); default: break; }