From da1abaa1dbc18bcde9d0b36afac3d1a7cab2a6ed Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 4 Jan 2016 12:07:33 +0100 Subject: [PATCH] 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(). --- src/devices/nm-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index d8d243f593..0aa7650891 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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;