mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
manager: make generic devices compatible with all link types
If a generic device is present and the name matches, it is compatible with any link type. For example, if a generic connection has a device-handler that creates a dummy interface, the link is compatible with the NMDeviceGeneric.
This commit is contained in:
parent
f2613be150
commit
5978fb2b27
|
@ -4168,8 +4168,11 @@ platform_link_added(NMManager *self,
|
|||
gboolean compatible = TRUE;
|
||||
gs_free_error GError *error = NULL;
|
||||
|
||||
if (nm_device_get_link_type(candidate) != plink->type)
|
||||
if (nm_device_get_device_type(candidate) == NM_DEVICE_TYPE_GENERIC) {
|
||||
/* generic devices are compatible with all link types */
|
||||
} else if (nm_device_get_link_type(candidate) != plink->type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!nm_streq(nm_device_get_iface(candidate), plink->name))
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue