diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-10-02 15:19:48 +0200 |
---|---|---|
committer | Íñigo Huguet <ihuguet@redhat.com> | 2024-02-21 11:49:21 +0100 |
commit | f9c0f7ae64d7acd2087039517be862d962994eaf (patch) | |
tree | 14482646bc80e5f1354664adc304572b191b097e | |
parent | 3bb34edc5331f9ffafac5ca45ba07adbcc0ae071 (diff) |
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.
(cherry picked from commit 5978fb2b27cdda8f119735bf51bee1942f6921f7)
-rw-r--r-- | src/core/nm-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c index 9284ae8c43..730ba4763b 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -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; |