diff options
author | Dan Williams <dcbw@redhat.com> | 2013-11-14 09:58:30 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2013-12-02 15:32:31 -0600 |
commit | 75a9bc8e315e97ddfa62116744c68ef1e38253bb (patch) | |
tree | 2d2b6bce17b8f739b7051602c47f20eab4d0bd26 | |
parent | 038e45d29ab634af9d733024fdcdc20789db266d (diff) | |
download | NetworkManager-75a9bc8e315e97ddfa62116744c68ef1e38253bb.tar.gz |
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.
-rw-r--r-- | src/devices/nm-device-generic.c | 8 |
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); } /**************************************************************/ |