mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-06 21:00:39 +01:00
devices: fix "slaves" property notification in release_slaves
Bond, bridge, and team were notifying their "slaves" properties before the slave actually got removed from priv->slaves, meaning that anything that looked at the property directly from a notify::slaves handler would see the old value. Fix that.
This commit is contained in:
parent
1f22c8859a
commit
c48ba1ab10
1 changed files with 1 additions and 1 deletions
|
|
@ -956,6 +956,7 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave)
|
|||
info = find_slave_info (dev, slave);
|
||||
if (!info)
|
||||
return FALSE;
|
||||
priv->slaves = g_slist_remove (priv->slaves, info);
|
||||
|
||||
if (info->enslaved) {
|
||||
success = NM_DEVICE_GET_CLASS (dev)->release_slave (dev, slave);
|
||||
|
|
@ -968,7 +969,6 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave)
|
|||
reason = priv->state_reason;
|
||||
nm_device_slave_notify_release (info->slave, reason);
|
||||
|
||||
priv->slaves = g_slist_remove (priv->slaves, info);
|
||||
free_slave_info (info);
|
||||
|
||||
/* Ensure the device's hardware address is up-to-date; it often changes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue