diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-06-02 13:27:43 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-06-02 13:27:43 +0200 |
commit | 82a5af32d051519e1abbcb4150cf9b9a02bf92f9 (patch) | |
tree | 8082f6c4332de21272d7c04cc53df789879ceb03 | |
parent | 97517e0688750739d60e3cc221ba6ebe735d7cb9 (diff) |
Revert "device: only deactivate when the master we've enslaved to goes away"lr/cancel-ip-state-with-activation-p2
This reverts commit 0b712a071834830b70e7e641c7a40afce57b8427.
-rw-r--r-- | src/core/devices/nm-device.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index c1a40a1ef6..c14cb74bab 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -7924,9 +7924,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: @@ -7956,12 +7953,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); + } } /** |