devices: don't release slaves on exit (rh #1169936)

nm_device_removed() calls nm_device_release_one_slave() in order to
fix up NetworkManager's master/slave bookkeeping, but we don't want to
tell the kernel to actually unslave the device, since that would
happen automatically anyway if the device was really removed, and
shouldn't happen if the device is just being removed from NM's device
list.

(In particular, don't remove all libvirt-created virtual network
devices from virbr0 when NetworkManager exits.)
This commit is contained in:
Dan Winship 2014-12-03 10:21:11 -05:00
parent 6d6c433bab
commit 5dd48f7527

View file

@ -1623,7 +1623,7 @@ nm_device_removed (NMDevice *self)
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
if (priv->enslaved)
nm_device_release_one_slave (priv->master, self, TRUE, NM_DEVICE_STATE_REASON_REMOVED);
nm_device_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_REMOVED);
}