diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-11-30 22:32:33 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-11-30 22:36:55 +0100 |
commit | 526b484be1981b4bfcc5e48d5480c6ac7ccd8b66 (patch) | |
tree | a44d4e06880c485af4e96e31c5c63cc699c77c97 | |
parent | d0df9bf0bd982ebf3dd9cf34dc240bf517012ff8 (diff) | |
download | NetworkManager-526b484be1981b4bfcc5e48d5480c6ac7ccd8b66.tar.gz |
dns: sd-resolved: fix hash table iteration
g_hash_table_iter_next() wants a (gpointer *), not an (int *).
Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation')
-rw-r--r-- | src/dns/nm-dns-systemd-resolved.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c index dccc6337a5..6d37f4022a 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -422,6 +422,7 @@ update(NMDnsPlugin * plugin, gs_free gpointer * interfaces_keys = NULL; guint interfaces_len; int ifindex; + gpointer pointer; NMDnsConfigIPData *ip_data; GHashTableIter iter; guint i; @@ -463,7 +464,8 @@ update(NMDnsPlugin * plugin, * resolved, and the current update doesn't contain that interface, * reset the resolved configuration for that ifindex. */ g_hash_table_iter_init(&iter, priv->dirty_interfaces); - while (g_hash_table_iter_next(&iter, (gpointer *) &ifindex, NULL)) { + while (g_hash_table_iter_next(&iter, (gpointer *) &pointer, NULL)) { + ifindex = GPOINTER_TO_INT(pointer); if (!g_hash_table_contains(interfaces, GINT_TO_POINTER(ifindex))) { InterfaceConfig ic; |