summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-06-09 14:42:25 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-06-09 14:42:25 +0200
commit592aa7114281fdf3295aea15e7b81a7f38e314a2 (patch)
tree1d101c68860c46e9d6097dc5e587c7c3502a60b7
parent59a244bdca6b7da3665ba3e2a120488259c88c95 (diff)
downloadNetworkManager-lr/cancel-ip-state-with-activation-v4.tar.gz
Revert "device: only deactivate when the master we've enslaved to goes away"lr/cancel-ip-state-with-activation-v4
This reverts commit 9dcfb3d09135d78673226d9953782a097467eda8.
-rw-r--r--src/core/devices/nm-device.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 3795e98d06..c8fd660601 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -7923,9 +7923,6 @@ nm_device_slave_notify_release(NMDevice *self, NMDeviceStateReason reason)
g_return_if_fail(priv->master);
- if (!priv->is_enslaved)
- return;
-
if (priv->state > NM_DEVICE_STATE_DISCONNECTED && priv->state <= NM_DEVICE_STATE_ACTIVATED) {
switch (nm_device_state_reason_check(reason)) {
case NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED:
@@ -7955,12 +7952,14 @@ nm_device_slave_notify_release(NMDevice *self, NMDeviceStateReason reason)
} else
_LOGI(LOGD_DEVICE, "released from master device %s", nm_device_get_iface(priv->master));
- priv->is_enslaved = FALSE;
+ if (priv->is_enslaved) {
+ priv->is_enslaved = FALSE;
- _notify(self, PROP_MASTER);
+ _notify(self, PROP_MASTER);
- nm_clear_pointer(&NM_DEVICE_GET_PRIVATE(priv->master)->ports_variant, g_variant_unref);
- nm_gobject_notify_together(priv->master, PROP_PORTS, PROP_SLAVES);
+ nm_clear_pointer(&NM_DEVICE_GET_PRIVATE(priv->master)->ports_variant, g_variant_unref);
+ nm_gobject_notify_together(priv->master, PROP_PORTS, PROP_SLAVES);
+ }
}
/**