conf: add ipv4 and ipv6 options to server/pool/peer directive

Accept "ipv4" and "ipv6" options in the server/pool/peer directive to
use only IPv4 or IPv6 addresses respectively.

The configuration is different from the "server [-4|-6] hostname" syntax
supported by ntpd to avoid breaking existing scripts which expect the
hostname to always be the first argument of the directives.
This commit is contained in:
Miroslav Lichvar
2024-02-05 14:20:19 +01:00
parent d7c2b1d2f3
commit 5cb584d6c1
4 changed files with 16 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
typedef struct {
char *name;
int family;
int port;
SourceParameters params;
} CPS_NTP_Source;