Skip to content

Add support for systemd sockets

Luke Valenta requested to merge lukevalenta/chrony:systemd.patch into master

Before opening new server sockets, chronyd will check for matching reusable sockets passed from the service manager (for example, passed via systemd socket activation: https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html) and use those instead.

Aside from IPV6_V6ONLY (which cannot be set on already-bound sockets), the daemon sets the same socket options on reusable sockets as it would on sockets it opens itself.

Unit tests test the correct parsing of the LISTEN_FDS environment variable and comparing socket address equality.

System tests test socket activation functionality using the test tool systemd-socket-activate (which has some limitations requiring workarounds, discussed in test/system/011-systemd).

Merge request reports