Blame SOURCES/1001-dns-sd-resolved-fix-hash-table-initialization-rh1894839.patch

4fabf6
From 0cb0558e368898471a5169b8f9002a661792b2cb Mon Sep 17 00:00:00 2001
4fabf6
From: Beniamino Galvani <bgalvani@redhat.com>
4fabf6
Date: Fri, 6 Nov 2020 23:37:16 +0100
4fabf6
Subject: [PATCH] dns: sd-resolved: fix hash table initialization
4fabf6
4fabf6
The hash table was not initialized if there was no D-Bus connection at
4fabf6
the time of object creation.
4fabf6
4fabf6
Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation')
4fabf6
4fabf6
https://bugzilla.redhat.com/show_bug.cgi?id=1894839
4fabf6
(cherry picked from commit d6457902d127f2a29be4d12fe5b9ae94e3106b57)
4fabf6
---
4fabf6
 src/dns/nm-dns-systemd-resolved.c | 3 +--
4fabf6
 1 file changed, 1 insertion(+), 2 deletions(-)
4fabf6
4fabf6
diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c
4fabf6
index 8bbfd6a4cd..f1d08f67be 100644
4fabf6
--- a/src/dns/nm-dns-systemd-resolved.c
4fabf6
+++ b/src/dns/nm-dns-systemd-resolved.c
4fabf6
@@ -504,6 +504,7 @@ nm_dns_systemd_resolved_init(NMDnsSystemdResolved *self)
4fabf6
     NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(self);
4fabf6
 
4fabf6
     c_list_init(&priv->request_queue_lst_head);
4fabf6
+    priv->dirty_interfaces = g_hash_table_new(nm_direct_hash, NULL);
4fabf6
 
4fabf6
     priv->dbus_connection = nm_g_object_ref(NM_MAIN_DBUS_CONNECTION_GET);
4fabf6
     if (!priv->dbus_connection) {
4fabf6
@@ -524,8 +525,6 @@ nm_dns_systemd_resolved_init(NMDnsSystemdResolved *self)
4fabf6
                                            priv->cancellable,
4fabf6
                                            get_name_owner_cb,
4fabf6
                                            self);
4fabf6
-
4fabf6
-    priv->dirty_interfaces = g_hash_table_new(nm_direct_hash, NULL);
4fabf6
 }
4fabf6
 
4fabf6
 NMDnsPlugin *
4fabf6
-- 
4fabf6
2.26.2
4fabf6