diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-11-30 22:32:33 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-11-30 23:13:38 +0100 |
commit | 1ea72435dae474b768752cb1d57e7112bd04b664 (patch) | |
tree | e5f4e27b10c95827e71d9a1f7a8ef519eb31bfc2 | |
parent | c5682f736f7eee30a5c731d6b5ce8c0742b11e41 (diff) | |
download | NetworkManager-1ea72435dae474b768752cb1d57e7112bd04b664.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')
(cherry picked from commit 526b484be1981b4bfcc5e48d5480c6ac7ccd8b66)
(cherry picked from commit dedcba61ef79c09c40eeaea3aa90a871097cbda3)
(cherry picked from commit b42696d70b08ecd2fa4aa3854acc297e1ac18f38)
-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 621a269cca..fee7986375 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -358,6 +358,7 @@ update (NMDnsPlugin *plugin, gs_free gpointer *interfaces_keys = NULL; guint interfaces_len; int ifindex; + gpointer pointer; NMDnsIPConfigData *ip_data; GHashTableIter iter; guint i; @@ -402,7 +403,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; |