mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-11 01:20:32 +01:00
core: merge branch 'bg/external-slaves-rh1442361'
https://bugzilla.redhat.com/show_bug.cgi?id=1442361
This commit is contained in:
commit
6a740fa247
1 changed files with 5 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
@ -3812,13 +3816,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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue