mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 09:38:06 +02:00
core: merge branch 'bg/device-realize-failed-rh1686634'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/252
https://bugzilla.redhat.com/show_bug.cgi?id=1686634
(cherry picked from commit dbfbbed53c)
This commit is contained in:
commit
0e4d0f8d3f
2 changed files with 5 additions and 3 deletions
|
|
@ -4151,11 +4151,12 @@ nm_device_create_and_realize (NMDevice *self,
|
||||||
nm_auto_nmpobj const NMPObject *plink_keep_alive = NULL;
|
nm_auto_nmpobj const NMPObject *plink_keep_alive = NULL;
|
||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||||
const NMPlatformLink *plink;
|
const NMPlatformLink *plink;
|
||||||
|
gboolean nm_owned;
|
||||||
|
|
||||||
/* Must be set before device is realized */
|
/* Must be set before device is realized */
|
||||||
plink = nm_platform_link_get_by_ifname (nm_device_get_platform (self), priv->iface);
|
plink = nm_platform_link_get_by_ifname (nm_device_get_platform (self), priv->iface);
|
||||||
priv->nm_owned = !plink || !link_type_compatible (self, plink->type, NULL, NULL);
|
nm_owned = !plink || !link_type_compatible (self, plink->type, NULL, NULL);
|
||||||
_LOGD (LOGD_DEVICE, "create (is %snm-owned)", priv->nm_owned ? "" : "not ");
|
_LOGD (LOGD_DEVICE, "create (is %snm-owned)", nm_owned ? "" : "not ");
|
||||||
|
|
||||||
plink = NULL;
|
plink = NULL;
|
||||||
/* Create any resources the device needs */
|
/* Create any resources the device needs */
|
||||||
|
|
@ -4168,6 +4169,8 @@ nm_device_create_and_realize (NMDevice *self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->nm_owned = nm_owned;
|
||||||
|
|
||||||
realize_start_setup (self,
|
realize_start_setup (self,
|
||||||
plink,
|
plink,
|
||||||
FALSE, /* assume_state_guess_assume */
|
FALSE, /* assume_state_guess_assume */
|
||||||
|
|
|
||||||
|
|
@ -2032,7 +2032,6 @@ system_create_virtual_device (NMManager *self, NMConnection *connection)
|
||||||
"couldn't create the device: %s",
|
"couldn't create the device: %s",
|
||||||
error->message);
|
error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
remove_device (self, device, FALSE);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue