summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-11-06 23:37:16 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-11-06 23:39:46 +0100
commitd6457902d127f2a29be4d12fe5b9ae94e3106b57 (patch)
treeb6fae57829669175b7f6a3d2e1a009264f7fc9da
parente814b59635efd8e7b2351bcf4757b4265b0a3c47 (diff)
downloadNetworkManager-bg/rh1894839.tar.gz
dns: sd-resolved: fix hash table initializationbg/rh1894839
The hash table was not initialized if there was no D-Bus connection at the time of object creation. Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation') https://bugzilla.redhat.com/show_bug.cgi?id=1894839
-rw-r--r--src/dns/nm-dns-systemd-resolved.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c
index 8bbfd6a4cd..f1d08f67be 100644
--- a/src/dns/nm-dns-systemd-resolved.c
+++ b/src/dns/nm-dns-systemd-resolved.c
@@ -504,6 +504,7 @@ nm_dns_systemd_resolved_init(NMDnsSystemdResolved *self)
NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(self);
c_list_init(&priv->request_queue_lst_head);
+ priv->dirty_interfaces = g_hash_table_new(nm_direct_hash, NULL);
priv->dbus_connection = nm_g_object_ref(NM_MAIN_DBUS_CONNECTION_GET);
if (!priv->dbus_connection) {
@@ -524,8 +525,6 @@ nm_dns_systemd_resolved_init(NMDnsSystemdResolved *self)
priv->cancellable,
get_name_owner_cb,
self);
-
- priv->dirty_interfaces = g_hash_table_new(nm_direct_hash, NULL);
}
NMDnsPlugin *