mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 14:20:16 +01:00
manager: let external devices go on removal
If we didn't create them, we shouldn't keep them around unrealized.
This commit is contained in:
parent
e25d144d77
commit
7e5f27a21c
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue