mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 09:50:09 +01:00
core: updating a Generic setting should set the interface name
Generic connections need an interface name, and that can only be stored in the Connection setting.
This commit is contained in:
parent
038e45d29a
commit
75a9bc8e31
1 changed files with 8 additions and 0 deletions
|
|
@ -98,8 +98,16 @@ check_connection_compatible (NMDevice *device,
|
|||
static void
|
||||
update_connection (NMDevice *device, NMConnection *connection)
|
||||
{
|
||||
NMSettingConnection *s_con;
|
||||
|
||||
if (!nm_connection_get_setting_generic (connection))
|
||||
nm_connection_add_setting (connection, nm_setting_generic_new ());
|
||||
|
||||
s_con = nm_connection_get_setting_connection (connection);
|
||||
g_assert (s_con);
|
||||
g_object_set (G_OBJECT (s_con),
|
||||
NM_SETTING_CONNECTION_INTERFACE_NAME, nm_device_get_iface (device),
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue