summaryrefslogtreecommitdiff
path: root/libnm-core
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-18 11:38:18 +0200
committerThomas Haller <thaller@redhat.com>2017-09-26 19:36:51 +0200
commit6aed608011d84d87c8bf96f3c73db8806c6a739a (patch)
tree941598594eedb7dbdfb916b9e1e9177081845914 /libnm-core
parent7cd04ce014732a5c50389dc0c6d9804a9e2c0e5c (diff)
downloadNetworkManager-6aed608011d84d87c8bf96f3c73db8806c6a739a.tar.gz
libnm-core: sort attribute names for nm_ip_route_get_attribute_names()
The function shall return the attribute names in a consistent order. Let's sort by name.
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/nm-setting-ip-config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c
index 2a8f38f839..3ab159b097 100644
--- a/libnm-core/nm-setting-ip-config.c
+++ b/libnm-core/nm-setting-ip-config.c
@@ -1128,6 +1128,7 @@ nm_ip_route_get_attribute_names (NMIPRoute *route)
while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL))
g_ptr_array_add (names, g_strdup (key));
}
+ g_ptr_array_sort (names, nm_strcmp_p);
g_ptr_array_add (names, NULL);
return (char **) g_ptr_array_free (names, FALSE);