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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user