device: don't promote slave devices to managed

Previously, if a master device had internal state 'managed', we would
promote the slave to 'managed' as well. However,

 - if the slave is 'external', it should stay as is because we don't
   want to start managing it

 - if the slave is 'assumed', it will become managed when the
   activation succeeds, so it's not necessary to do it here

Fixes: 850c977953
This commit is contained in:
Beniamino Galvani 2017-08-31 18:23:33 +02:00
parent 7246c87f0f
commit 9e99590508

View file

@ -3812,13 +3812,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) {