mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 21:30:10 +01:00
libnm: fix _nm_setting_property_compare_fcn_default() to use nm_g_variant_equal()
nm_property_compare() makes a misguided attempt to compare dictionaries regardless of their order. However, if variants contain duplicate keys, then the implementation is wrong and cannot handle it correctly. Regardless of that. While in some sense the order of dictionary keys is irrelevant, this is not the right place to perform such normalization. If the order of things doesn't matter, then NMSetting must normalize the property (e.g. by sorting the keys). At that point, the GVariant shall be compared fully.
This commit is contained in:
parent
0e893593a9
commit
e415e4fc18
1 changed files with 1 additions and 2 deletions
|
|
@ -11,7 +11,6 @@
|
|||
#include "libnm-core-intern/nm-core-internal.h"
|
||||
#include "libnm-glib-aux/nm-ref-string.h"
|
||||
#include "libnm-glib-aux/nm-secret-utils.h"
|
||||
#include "nm-property-compare.h"
|
||||
#include "nm-setting-private.h"
|
||||
#include "nm-utils-private.h"
|
||||
#include "nm-utils.h"
|
||||
|
|
@ -2653,7 +2652,7 @@ _nm_setting_property_compare_fcn_default(_NM_SETT_INFO_PROP_COMPARE_FCN_ARGS _nm
|
|||
NM_CONNECTION_SERIALIZE_ALL,
|
||||
NULL,
|
||||
TRUE);
|
||||
return nm_property_compare(value1, value2) == 0;
|
||||
return nm_g_variant_equal(value1, value2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue