summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-04-23 20:14:19 +0200
committerThomas Haller <thaller@redhat.com>2021-04-28 13:20:03 +0200
commit5cc6932d5a011641030ee0464bd7b5381f7d5b1d (patch)
treebb1e2170b07f9c096a76720a50e5dc309128acab
parente7d78e90a3d6b5f5925274808fdf4ab3f6c57808 (diff)
downloadNetworkManager-5cc6932d5a011641030ee0464bd7b5381f7d5b1d.tar.gz
dns/resolved: use unique D-Bus name for systemd-resolved request
As we already track the current name owner, it seems wrong to make requests to the well-known name. It theoretically opens a race where we would talk to the wrong systemd-resolved instance. So far, we didn't care and it didn't make much of a difference. Still, let's talk to the process that we expect.
-rw-r--r--src/core/dns/nm-dns-systemd-resolved.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/dns/nm-dns-systemd-resolved.c b/src/core/dns/nm-dns-systemd-resolved.c
index 2704c761b1..8f71a83784 100644
--- a/src/core/dns/nm-dns-systemd-resolved.c
+++ b/src/core/dns/nm-dns-systemd-resolved.c
@@ -417,16 +417,8 @@ send_updates(NMDnsSystemdResolved *self)
continue;
}
- /* Above we explicitly call "StartServiceByName" trying to avoid D-Bus activating systmd-resolved
- * multiple times. There is still a race, were we might hit this line although actually
- * the service just quit this very moment. In that case, we would try to D-Bus activate the
- * service multiple times during each call (something we wanted to avoid).
- *
- * But this is hard to avoid, because we'd have to check the error failure to detect the reason
- * and retry. The race is not critical, because at worst it results in logging a warning
- * about failure to start systemd.resolved. */
g_dbus_connection_call(priv->dbus_connection,
- SYSTEMD_RESOLVED_DBUS_SERVICE,
+ priv->dbus_owner,
SYSTEMD_RESOLVED_DBUS_PATH,
SYSTEMD_RESOLVED_MANAGER_IFACE,
request_item->operation,