diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-09 11:25:13 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-22 15:24:31 +0200 |
commit | 54ff670423abf86b12833f980f8cff9c39f8c1b9 (patch) | |
tree | 11b8b6a67fa85e7a5893c3ac0f34c7fa10b2c3c7 | |
parent | a9e0796433cd89c7a2280777ac35e659c95b52d8 (diff) | |
download | NetworkManager-54ff670423abf86b12833f980f8cff9c39f8c1b9.tar.gz |
keyfile: don't add [connection].type base setting which is done by nm_connection_normalize()
This undoes commit 9f8b7ff51dfd7cdb828fe5e7b50016c5587e8657
but the same functionality is now provided via normalize().
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/settings/plugins/keyfile/reader.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c index 2e356b92e2..e2d1f823b0 100644 --- a/src/settings/plugins/keyfile/reader.c +++ b/src/settings/plugins/keyfile/reader.c @@ -1213,7 +1213,6 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error) gsize length; int i; gboolean vpn_secrets = FALSE; - const char *ctype; GError *verify_error = NULL; if (stat (filename, &statbuf) != 0 || !S_ISREG (statbuf.st_mode)) { @@ -1250,31 +1249,11 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error) nm_connection_add_setting (connection, setting); } - /* Make sure that we have the base device type setting even if - * the keyfile didn't include it, which can happen when the base - * device type setting is all default values (like ethernet where - * the MAC address isn't given, or VLAN when the VLAN ID is zero). - */ s_con = nm_connection_get_setting_connection (connection); if (!s_con) { s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ()); nm_connection_add_setting (connection, NM_SETTING (s_con)); } - ctype = nm_setting_connection_get_connection_type (s_con); - if (ctype) { - setting = nm_connection_get_setting_by_name (connection, ctype); - if (!setting) { - NMSetting *base_setting; - GType base_setting_type; - - base_setting_type = nm_setting_lookup_type (ctype); - if (base_setting_type != G_TYPE_INVALID) { - base_setting = (NMSetting *) g_object_new (base_setting_type, NULL); - g_assert (base_setting); - nm_connection_add_setting (connection, base_setting); - } - } - } /* Make sure that we have 'id' even if not explictly specified in the keyfile */ if (!nm_setting_connection_get_id (s_con)) { |