From 75a9bc8e315e97ddfa62116744c68ef1e38253bb Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 14 Nov 2013 09:58:30 -0600 Subject: [PATCH] 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. --- src/devices/nm-device-generic.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/devices/nm-device-generic.c b/src/devices/nm-device-generic.c index e435f5dff0..1c4c8affe1 100644 --- a/src/devices/nm-device-generic.c +++ b/src/devices/nm-device-generic.c @@ -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); } /**************************************************************/