mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-07 07:30:29 +01:00
device: fix autoactivating virtual devices after a failure
When a virtual device fails, its state goes to FAIL and then
DISCONNECTED. In DISCONNECTED we call schedule_activate_check() to
schedule an auto-activation if needed. We also schudule the deletion
of the link through delete_on_deactivate_check_and_schedule(). The
auto-activation attempt fails because the link deletion unmanages the
device; as a result, the device doesn't try to auto-activate again.
To fix this:
- don't allow the device to auto-activate if the device deletion is
pending;
- check again if the device can be auto-activated after its deletion.
https://bugzilla.redhat.com/show_bug.cgi?id=1818697
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/613
(cherry picked from commit e404585e60)
This commit is contained in:
parent
9f7736ea8e
commit
dac89c0727
1 changed files with 5 additions and 0 deletions
|
|
@ -5968,6 +5968,9 @@ nm_device_autoconnect_allowed (NMDevice *self)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (priv->delete_on_deactivate_data)
|
||||
return FALSE;
|
||||
|
||||
/* The 'autoconnect-allowed' signal is emitted on a device to allow
|
||||
* other listeners to block autoconnect on the device if they wish.
|
||||
* This is mainly used by the OLPC Mesh devices to block autoconnect
|
||||
|
|
@ -11983,6 +11986,8 @@ delete_on_deactivate_link_delete (gpointer user_data)
|
|||
} else if (data->ifindex > 0)
|
||||
nm_platform_link_delete (nm_device_get_platform (self), data->ifindex);
|
||||
|
||||
nm_device_emit_recheck_auto_activate (self);
|
||||
|
||||
g_free (data);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue