From 7e5f27a21ca22d986755e4cc480e85d8a51ff17d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 9 Dec 2015 15:41:39 +0100 Subject: [PATCH] manager: let external devices go on removal If we didn't create them, we shouldn't keep them around unrealized. --- src/nm-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 33b97fc4aa..3001085fc9 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2042,8 +2042,8 @@ _platform_link_cb_idle (PlatformLinkCbData *data) device = nm_manager_get_device_by_ifindex (self, data->ifindex); if (device) { - if (nm_device_is_software (device)) { - /* Software devices stick around until their connection is removed */ + if (nm_device_is_software (device) && nm_device_get_is_nm_owned (device)) { + /* Our software devices stick around until their connection is removed */ if (!nm_device_unrealize (device, FALSE, &error)) { nm_log_warn (LOGD_DEVICE, "(%s): failed to unrealize: %s", nm_device_get_iface (device), @@ -2052,7 +2052,7 @@ _platform_link_cb_idle (PlatformLinkCbData *data) remove_device (self, device, FALSE, TRUE); } } else { - /* Hardware devices always get removed when their kernel link is gone */ + /* Hardware and external devices always get removed when their kernel link is gone */ remove_device (self, device, FALSE, TRUE); } }