platform: fix IPv4 address lookup in nm_platform_ip4_address_sync()

Fixes: 5fcca9ba3e
This commit is contained in:
Beniamino Galvani 2017-07-26 13:54:04 +02:00
parent 2f4dfd0f2e
commit 5414239988

View file

@ -3199,8 +3199,8 @@ nm_platform_ip4_address_sync (NMPlatform *self,
goto delete_and_next;
if (G_UNLIKELY (!known_addresses_idx)) {
known_addresses_idx = g_hash_table_new ((GHashFunc) nmp_object_hash,
(GEqualFunc) nmp_object_equal);
known_addresses_idx = g_hash_table_new ((GHashFunc) nmp_object_id_hash,
(GEqualFunc) nmp_object_id_equal);
}
if (!nm_g_hash_table_insert (known_addresses_idx, (gpointer) o, (gpointer) o)) {
/* duplicate? Keep only the first instance. */