mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 08:50:27 +01:00
device-factory: always prefer manually set interface name to a generated one
If the connection specifies an interface name, it should never attach to a device of a different name even if the factory thinks the connection is compatible with the device. This fixes an issue that caused the inifniband connections to attach to different devices or partitions.
This commit is contained in:
parent
178c972fac
commit
332994f1b1
1 changed files with 2 additions and 3 deletions
|
|
@ -187,10 +187,9 @@ nm_device_factory_get_connection_iface (NMDeviceFactory *factory,
|
|||
|
||||
klass = NM_DEVICE_FACTORY_GET_INTERFACE (factory);
|
||||
|
||||
if (klass->get_connection_iface)
|
||||
ifname = g_strdup (nm_connection_get_interface_name (connection));
|
||||
if (!ifname && klass->get_connection_iface)
|
||||
ifname = klass->get_connection_iface (factory, connection, parent_iface);
|
||||
else
|
||||
ifname = g_strdup (nm_connection_get_interface_name (connection));
|
||||
|
||||
if (!ifname) {
|
||||
g_set_error (error,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue