]> git.ipfire.org Git - thirdparty/systemd.git/commit
Implement DNS notifications from resolved via varlink
authorSuraj Krishnan <72937403+surajkrishnan14@users.noreply.github.com>
Tue, 26 Apr 2022 22:09:02 +0000 (17:09 -0500)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 9 Sep 2022 08:22:57 +0000 (09:22 +0100)
commitcb456374e096f0ebe9b70d7ddd98e16a4be24ee6
tree514bb0753834490ab81e8a21669abe28ba66205a
parent761787fc88aff81f3e97da07ac829f431479fe0b
Implement DNS notifications from resolved via varlink

* The new varlink interface exposes a method to subscribe to DNS
resolutions on the system. The socket permissions are open for owner and
group only.
* Notifications are sent to subscriber(s), if any, after successful
resolution of A and AAAA records.

This feature could be used by applications for auditing/logging services
downstream of the resolver. It could also be used to asynchronously
update the firewall. For example, a system that has a tightly configured
firewall could open up connections selectively to known good hosts based
on a known allow-list of hostnames. Of course, updating the firewall
asynchronously will require other design considerations (such as
queueing packets in the user space while a verdict is made).

See also:
https://lists.freedesktop.org/archives/systemd-devel/2022-August/048202.html
https://lists.freedesktop.org/archives/systemd-devel/2022-February/047441.html
12 files changed:
man/org.freedesktop.resolve1.xml
man/resolved.conf.xml
src/resolve/resolved-bus.c
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-query.h
src/resolve/resolved-gperf.gperf
src/resolve/resolved-manager.c
src/resolve/resolved-manager.h
src/resolve/resolved-varlink.c
src/resolve/resolved.conf.in
test/knot-data/zones/onlinesign.test.zone
test/units/testsuite-75.sh