diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-08-31 18:29:42 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-09-02 10:38:28 +0200 |
commit | 981f90e32425bc9cf2086cdd9b160942a5a6f8ee (patch) | |
tree | 73e420f276821df582d41aa402cf049d84da8a50 | |
parent | 9e995905082cddbdfc85892b205f8f898cb5d437 (diff) | |
download | NetworkManager-981f90e32425bc9cf2086cdd9b160942a5a6f8ee.tar.gz |
device: don't release external slaves on state change
If the slave is 'external' we should never touch it, in particular we
should not release the link from its master; we only have to remove it
from master's list.
https://bugzilla.redhat.com/show_bug.cgi?id=1442361
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 273e89d017..ec36197561 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3578,6 +3578,7 @@ slave_state_changed (NMDevice *slave, { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); gboolean release = FALSE; + gboolean configure; _LOGD (LOGD_DEVICE, "slave %s state change %d (%s) -> %d (%s)", nm_device_get_iface (slave), @@ -3601,8 +3602,11 @@ slave_state_changed (NMDevice *slave, } if (release) { + configure = priv->sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_MANAGED + && nm_device_sys_iface_state_get (slave) != NM_DEVICE_SYS_IFACE_STATE_EXTERNAL; + nm_device_master_release_one_slave (self, slave, - priv->sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_MANAGED, + configure, reason); /* Bridge/bond/team interfaces are left up until manually deactivated */ if ( c_list_is_empty (&priv->slaves) |