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:
Dan Williams 2013-11-14 09:58:30 -06:00
parent 038e45d29a
commit 75a9bc8e31

View file

@ -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);
}
/**************************************************************/