mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 01:50:08 +01:00
core: don't override user provided "connection.interface-name" in nm_utils_complete_generic()
nm_utils_complete_generic() is supposed to complete information which the user didn't provide. If the profile already has an interface-name, keep it.
This commit is contained in:
parent
bc57c79d57
commit
eb634c6077
1 changed files with 3 additions and 1 deletions
|
|
@ -268,7 +268,9 @@ nm_utils_complete_generic(NMPlatform * platform,
|
|||
}
|
||||
|
||||
/* Add an interface name, if requested */
|
||||
if (ifname) {
|
||||
if (nm_setting_connection_get_interface_name(s_con)) {
|
||||
/* pass */
|
||||
} else if (ifname) {
|
||||
g_object_set(G_OBJECT(s_con), NM_SETTING_CONNECTION_INTERFACE_NAME, ifname, NULL);
|
||||
} else if (ifname_prefix && !nm_setting_connection_get_interface_name(s_con)) {
|
||||
generated_ifname = get_new_connection_ifname(platform, existing_connections, ifname_prefix);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue