summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-04-17 10:24:41 +0200
committerThomas Haller <thaller@redhat.com>2023-05-12 12:48:18 +0200
commit7c49db95dac434502197018db00bf9b15165692d (patch)
tree194276bd70d3dee98a7712fd9ae4c5030f59b08f
parent43c1b56a133cee03eee1716329814294453e738d (diff)
downloadNetworkManager-th/rh2156684-ignore-carrier.tar.gz
device: delete software device when disconnecting device due to loss of carrierth/rh2156684-ignore-carrier
It's not well defined when we delete devices. In general, we delete devices when the connection goes down and NetworkManager created the device earlier. Software devices like bond/bridge/team default to ignoring carrier. However, when configuring them to not ignore carrier ([device].ignore-carrier), they were not deleted when deactivating the devices. This adjusts commit d0c2a24b7140 ('device: do not remove software devices on initial disconnected (rh #1035814)'). Note that back then there was no check whether the device has an activation queued, so it behaved differently than.
-rw-r--r--src/core/devices/nm-device.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 6639492ee5..340fc55029 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -12823,8 +12823,6 @@ delete_on_deactivate_check_and_schedule(NMDevice *self)
return;
if (nm_device_get_state(self) == NM_DEVICE_STATE_UNMANAGED)
return;
- if (nm_device_get_state(self) == NM_DEVICE_STATE_UNAVAILABLE)
- return;
delete_on_deactivate_unschedule(self); /* always cancel and reschedule */
g_object_ref(self);