summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-09-02 10:46:31 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-09-02 10:46:31 +0200
commit6bc73f15906502cebdadeda70466640f792982ae (patch)
treebab153138c701c8f72d23901e1e11d3349f661f3
parentbc9269ffcb8d44d6fb54c9c1d7c5fa5637d04bac (diff)
parentac7d908d365ac5abcb3f8fcb16b3a26af8e43840 (diff)
core: merge branch 'bg/external-slaves-rh1442361'
https://bugzilla.redhat.com/show_bug.cgi?id=1442361 (cherry picked from commit 6a740fa247fefc8cc5c0b50458108e654db91dc5)
-rw-r--r--src/devices/nm-device.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 45a71032b..bacbfb33e 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -3422,6 +3422,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),
@@ -3445,8 +3446,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 (priv->slaves == NULL && priv->state == NM_DEVICE_STATE_ACTIVATED)
@@ -3692,13 +3696,6 @@ nm_device_slave_notify_enslave (NMDevice *self, gboolean success)
priv->is_enslaved = TRUE;
- if ( NM_IN_SET_TYPED (NMDeviceSysIfaceState,
- priv->sys_iface_state,
- NM_DEVICE_SYS_IFACE_STATE_EXTERNAL,
- NM_DEVICE_SYS_IFACE_STATE_ASSUME)
- && nm_device_sys_iface_state_get (priv->master) == NM_DEVICE_SYS_IFACE_STATE_MANAGED)
- nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_MANAGED);
-
_notify (self, PROP_MASTER);
_notify (priv->master, PROP_SLAVES);
} else if (activating) {