mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 18:30:38 +01:00
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.
This commit is contained in:
parent
e7d78e90a3
commit
5cc6932d5a
1 changed files with 1 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue