mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
device: cancel pending activation when slave is released
Since nm_device_slave_notify_release() is called from outside the activation chain of the slave device (it gets called from the master device) there might be pending activation sources scheduled, clear them before queueing a state change.
This commit is contained in:
parent
cfd3e1a13c
commit
f9feddbcf0
1 changed files with 3 additions and 1 deletions
|
|
@ -455,8 +455,8 @@ static gboolean dhcp6_start (NMDevice *self, gboolean wait_for_ll, NMDeviceState
|
||||||
static void nm_device_start_ip_check (NMDevice *self);
|
static void nm_device_start_ip_check (NMDevice *self);
|
||||||
static void realize_start_setup (NMDevice *self, const NMPlatformLink *plink);
|
static void realize_start_setup (NMDevice *self, const NMPlatformLink *plink);
|
||||||
static void nm_device_set_mtu (NMDevice *self, guint32 mtu);
|
static void nm_device_set_mtu (NMDevice *self, guint32 mtu);
|
||||||
|
|
||||||
static void dhcp_schedule_restart (NMDevice *self, int family, const char *reason);
|
static void dhcp_schedule_restart (NMDevice *self, int family, const char *reason);
|
||||||
|
static void _cancel_activation (NMDevice *self);
|
||||||
|
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
|
|
||||||
|
|
@ -2810,6 +2810,8 @@ nm_device_slave_notify_release (NMDevice *self, NMDeviceStateReason reason)
|
||||||
nm_connection_get_id (connection),
|
nm_connection_get_id (connection),
|
||||||
master_status);
|
master_status);
|
||||||
|
|
||||||
|
/* Cancel any pending activation sources */
|
||||||
|
_cancel_activation (self);
|
||||||
nm_device_queue_state (self, new_state, reason);
|
nm_device_queue_state (self, new_state, reason);
|
||||||
} else
|
} else
|
||||||
_LOGI (LOGD_DEVICE, "released from master device %s", nm_device_get_iface (priv->master));
|
_LOGI (LOGD_DEVICE, "released from master device %s", nm_device_get_iface (priv->master));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue