summaryrefslogtreecommitdiff
path: root/src/devices/nm-device-generic.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-11-14 09:58:30 -0600
committerDan Williams <dcbw@redhat.com>2013-12-02 15:32:31 -0600
commit75a9bc8e315e97ddfa62116744c68ef1e38253bb (patch)
tree2d2b6bce17b8f739b7051602c47f20eab4d0bd26 /src/devices/nm-device-generic.c
parent038e45d29ab634af9d733024fdcdc20789db266d (diff)
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.
Diffstat (limited to 'src/devices/nm-device-generic.c')
-rw-r--r--src/devices/nm-device-generic.c8
1 files changed, 8 insertions, 0 deletions
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);
}
/**************************************************************/