mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 13:48:36 +02:00
device: don't let external changes cause a release of the slave
At this point we don't know if the slave has been using an assumed
connection that just vanished -- the best bet is to let the device be.
If it's meant to be unenslaved, it won't be due to an external event.
https://bugzilla.redhat.com/show_bug.cgi?id=1357738
(cherry picked from commit 3127fb0d17)
This commit is contained in:
parent
0d23ffdb6b
commit
7e96eb5e66
1 changed files with 6 additions and 1 deletions
|
|
@ -2628,6 +2628,7 @@ slave_state_changed (NMDevice *slave,
|
||||||
{
|
{
|
||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||||
gboolean release = FALSE;
|
gboolean release = FALSE;
|
||||||
|
gboolean configure = TRUE;
|
||||||
|
|
||||||
_LOGD (LOGD_DEVICE, "slave %s state change %d (%s) -> %d (%s)",
|
_LOGD (LOGD_DEVICE, "slave %s state change %d (%s) -> %d (%s)",
|
||||||
nm_device_get_iface (slave),
|
nm_device_get_iface (slave),
|
||||||
|
|
@ -2650,8 +2651,12 @@ slave_state_changed (NMDevice *slave,
|
||||||
release = TRUE;
|
release = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't touch the device if its state changed externally. */
|
||||||
|
if (reason == NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED)
|
||||||
|
configure = FALSE;
|
||||||
|
|
||||||
if (release) {
|
if (release) {
|
||||||
nm_device_master_release_one_slave (self, slave, TRUE, reason);
|
nm_device_master_release_one_slave (self, slave, configure, reason);
|
||||||
/* Bridge/bond/team interfaces are left up until manually deactivated */
|
/* Bridge/bond/team interfaces are left up until manually deactivated */
|
||||||
if (priv->slaves == NULL && priv->state == NM_DEVICE_STATE_ACTIVATED)
|
if (priv->slaves == NULL && priv->state == NM_DEVICE_STATE_ACTIVATED)
|
||||||
_LOGD (LOGD_DEVICE, "last slave removed; remaining activated");
|
_LOGD (LOGD_DEVICE, "last slave removed; remaining activated");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue