[systemd-devel] [EXTERNAL] Re: [RFC] systemd-resolved: Send d-bus signal after DNS resolution
Suraj Krishnan
surajkr at microsoft.com
Wed Feb 16 19:30:03 UTC 2022
Thanks, Lennart, and others for great feedback I received on this thread.
I'm not familiar with varlink, but am starting to look into it.
Thanks
Suraj
-----Original Message-----
From: Lennart Poettering <lennart at poettering.net>
Sent: Wednesday, February 16, 2022 9:53 AM
To: Suraj Krishnan <surajkr at microsoft.com>
Cc: systemd-devel at lists.freedesktop.org; Andre Muezerie <Andre.Muezerie at microsoft.com>
Subject: [EXTERNAL] Re: [systemd-devel] [RFC] systemd-resolved: Send d-bus signal after DNS resolution
[You don't often get email from lennart at poettering.net. Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.]
On Di, 15.02.22 22:37, Suraj Krishnan (surajkr at microsoft.com) wrote:
> Hello,
>
> I'm reaching out to the community to gather feedback about a feature
> to broadcast a d-bus signal notification from systemd-resolved when a
> DNS query is completed. The message would contain information about
> the query and IP addresses received from the DNS server.
Broadcasting this on the system bus sounds like a bit too heavy. I am sure there are setups which will resolve a *lot* of names in a very short time, and you'd flood the bus with that. D-Bus is expressly not built for streaming more than control data, but if you have a flood of DNS requests it becomes substantially more than that.
Also, given that in 99.9%of all cases the broadcast messages would just be dropped by the broker because nothig is listening this sounds needlessly expensive.
What would make sense is adding a Varlink interface for this however. resolved uses varlink anyway it could just build on that. Varlink has the benefit that no broker is involved: if noone is listening we wouldn't do anything and not have to pay for it. Moreover varlink has no issues with streaming large amounts of data. And its easy to secure to ensure nobody unprivileged will see this (simply by making the socket have a restrictive access mode).
So yes, i think adding the concept makes a ton of sense. But not via D-Bus, but via Varlink. Would love to review/merge a patch that adds that and then exposes this via "resolvectl monitor" or so.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list