mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-17 22:10:26 +01:00
core: fix check on master active-connection failure
The previous check was never satisfied, as the device is assigned to
the active-connection and realized early. Instead, check the
master_ready flag, which tells if the master is ready and, therefore,
if the slave has already been added to the master.
Before this commit, in some cases a device didn't detect that the
master failed and kept waiting forever.
https://bugzilla.redhat.com/show_bug.cgi?id=1845018
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/568
(cherry picked from commit 0911d2a4ee)
This commit is contained in:
parent
680c0b8812
commit
223f741810
1 changed files with 3 additions and 3 deletions
|
|
@ -810,14 +810,14 @@ master_state_cb (NMActiveConnection *master,
|
|||
gpointer user_data)
|
||||
{
|
||||
NMActiveConnection *self = NM_ACTIVE_CONNECTION (user_data);
|
||||
NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self);
|
||||
NMActiveConnectionState master_state = nm_active_connection_get_state (master);
|
||||
NMDevice *master_device = nm_active_connection_get_device (master);
|
||||
|
||||
check_master_ready (self);
|
||||
|
||||
if ( master_state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATING
|
||||
&& (!master_device || !nm_device_is_real (master_device))) {
|
||||
/* Master failed without ever creating or realizing its device */
|
||||
&& !priv->master_ready) {
|
||||
/* Master disconnected before the slave was added */
|
||||
if (NM_ACTIVE_CONNECTION_GET_CLASS (self)->master_failed)
|
||||
NM_ACTIVE_CONNECTION_GET_CLASS (self)->master_failed (self);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue