diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-01-24 14:46:17 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-03-16 12:00:41 +0100 |
commit | 7b9a9352c2bc530eba39e8a00631454dfec4d878 (patch) | |
tree | f01346cff07be9684cf2266a862979446da43875 | |
parent | 99756757c83f411abecaeedbfff4233fe3e670c8 (diff) |
manager: relax check when creating virtual devicesbg/device-check-compatible
For each connection that corresponds to a software device, we create a
"unrealized" device that then becomes realized just before the
connection starts activating. Currently, in certain conditions NM
creates two devices with the same name and type, one realized and one
not; this is not expected and can lead to other issues especially when
a software device is reactivated.
Avoid that by relaxing the check in system_create_virtual_device(): if
a device exists with the same name and type, we don't want to create
another even if the type-specific parameters differ.
-rw-r--r-- | src/core/nm-manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c index a4612ffdde..d04aa18b25 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -2549,7 +2549,7 @@ system_create_virtual_device(NMManager *self, NMConnection *connection) /* See if there's a device that is already compatible with this connection */ c_list_for_each_entry (dev_candidate, &priv->devices_lst_head, devices_lst) { - if (nm_device_check_connection_compatible(dev_candidate, connection, TRUE, NULL)) { + if (nm_device_check_connection_compatible(dev_candidate, connection, FALSE, NULL)) { if (nm_device_is_real(dev_candidate)) { _LOG3D(LOGD_DEVICE, connection, "already created virtual interface name %s", iface); return NULL; |