mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 15:15:06 -05:00
ntp: support per-source IP family restriction
Add a new parameter to the NSR_AddSourceByName() function to allow individual sources to be limited to IPv4 or IPv6 addresses. This doesn't change the options passed to the resolver. It's just an additional filter in the processing of resolved addresses following the -4/-6 command-line option of chronyd.
This commit is contained in:
@@ -55,9 +55,12 @@ extern NSR_Status NSR_AddSource(NTP_Remote_Address *remote_addr, NTP_Source_Type
|
||||
|
||||
/* Procedure to add a new server, peer source, or pool of servers specified by
|
||||
name instead of address. The name is resolved in exponentially increasing
|
||||
intervals until it succeeds or fails with a non-temporary error. If the
|
||||
name is an address, it is equivalent to NSR_AddSource(). */
|
||||
extern NSR_Status NSR_AddSourceByName(char *name, int port, int pool, NTP_Source_Type type,
|
||||
intervals until it succeeds or fails with a non-temporary error. The
|
||||
specified family filters resolved addresses. If the name is an address
|
||||
and its family does not conflict with the specified family, it is equivalent
|
||||
to NSR_AddSource(). */
|
||||
extern NSR_Status NSR_AddSourceByName(char *name, int family, int port, int pool,
|
||||
NTP_Source_Type type,
|
||||
SourceParameters *params, uint32_t *conf_id);
|
||||
|
||||
extern const char *NSR_StatusToString(NSR_Status status);
|
||||
|
||||
Reference in New Issue
Block a user