mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 09:50:17 +01:00
device: reset the capabilities to class defaults when reseting them
Otherwise the lacking IS_SOFTWARE capability may cuase the connections not to be available on software devices and the devices would get garbage-collected at the end of unrealize().
This commit is contained in:
parent
48695df023
commit
da1abaa1db
1 changed files with 2 additions and 0 deletions
|
|
@ -2057,6 +2057,8 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error)
|
|||
g_clear_pointer (&priv->initial_hw_addr, g_free);
|
||||
|
||||
priv->capabilities = NM_DEVICE_CAP_NM_SUPPORTED;
|
||||
if (NM_DEVICE_GET_CLASS (self)->get_generic_capabilities)
|
||||
priv->capabilities |= NM_DEVICE_GET_CLASS (self)->get_generic_capabilities (self);
|
||||
g_object_notify (G_OBJECT (self), NM_DEVICE_CAPABILITIES);
|
||||
|
||||
priv->real = FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue