summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnm-core/nm-keyfile-reader.c17
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c6
2 files changed, 3 insertions, 20 deletions
diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c
index 3936a4a7a6..4a17d2c488 100644
--- a/libnm-core/nm-keyfile-reader.c
+++ b/libnm-core/nm-keyfile-reader.c
@@ -1278,10 +1278,7 @@ set_default_for_missing_key (NMSetting *setting, const char *property)
{
/* Set a value different from the default value of the property's spec */
- if (NM_IS_SETTING_VLAN (setting)) {
- if (!strcmp (property, NM_SETTING_VLAN_FLAGS))
- g_object_set (setting, property, (NMVlanFlags) 0, NULL);
- } else if (NM_IS_SETTING_WIRELESS (setting)) {
+ if (NM_IS_SETTING_WIRELESS (setting)) {
if (!strcmp (property, NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION))
g_object_set (setting, property, (NMSettingMacRandomization) NM_SETTING_MAC_RANDOMIZATION_NEVER, NULL);
}
@@ -1689,18 +1686,6 @@ nm_keyfile_read (GKeyFile *keyfile,
}
}
- /* Make sure that if [vlan] group was missing we set vlan.flags to 0
- * for backwards compatibility */
- if (nm_connection_is_type (connection, NM_SETTING_VLAN_SETTING_NAME)) {
- if (!nm_connection_get_setting_vlan (connection)) {
- NMSettingVlan *s_vlan;
-
- s_vlan = NM_SETTING_VLAN (nm_setting_vlan_new ());
- g_object_set (s_vlan, NM_SETTING_VLAN_FLAGS, 0, NULL);
- nm_connection_add_setting (connection, NM_SETTING (s_vlan));
- }
- }
-
return connection;
out_error:
g_propagate_error (error, info.error);
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index 7758724246..c1b79ef7d7 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -2630,8 +2630,7 @@ test_read_missing_vlan_setting (void)
s_vlan = nm_connection_get_setting_vlan (connection);
g_assert (s_vlan);
g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 0);
- /* Ensure the VLAN flags are not set (0) */
- g_assert_cmpint (nm_setting_vlan_get_flags (s_vlan), ==, 0);
+ g_assert_cmpint (nm_setting_vlan_get_flags (s_vlan), ==, NM_VLAN_FLAG_REORDER_HEADERS);
g_object_unref (connection);
}
@@ -2657,8 +2656,7 @@ test_read_missing_vlan_flags (void)
g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 444);
g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "em1");
- /* Ensure the VLAN flags are not set (0) */
- g_assert_cmpint (nm_setting_vlan_get_flags (s_vlan), ==, 0);
+ g_assert_cmpint (nm_setting_vlan_get_flags (s_vlan), ==, NM_VLAN_FLAG_REORDER_HEADERS);
g_object_unref (connection);
}