mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 06:20:17 +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.
(cherry picked from commit 332994f1b1)
This commit is contained in:
parent
60226446b3
commit
4abb943e84
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