mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
sources: enable selection options with authentication
When authentication is enabled for an NTP source, unauthenticated NTP sources need to be disabled or limited in selection. That might be difficult to do when the configuration comes from different sources (e.g. networking scripts adding servers from DHCP). Define four modes for the source selection to consider authentication: require, prefer, mix, ignore. In different modes different selection options (require, trust, noselect) are added to authenticated and unauthenticated sources. The mode can be selected by the authselectmode directive. The mix mode is the default. The ignore mode enables the old behavior, where all sources are used exactly as specified in the configuration.
This commit is contained in:
@@ -51,6 +51,14 @@ extern void SRC_Initialise(void);
|
||||
/* Finalisation function */
|
||||
extern void SRC_Finalise(void);
|
||||
|
||||
/* Modes for selecting NTP sources based on their authentication status */
|
||||
typedef enum {
|
||||
SRC_AUTHSELECT_IGNORE,
|
||||
SRC_AUTHSELECT_MIX,
|
||||
SRC_AUTHSELECT_PREFER,
|
||||
SRC_AUTHSELECT_REQUIRE,
|
||||
} SRC_AuthSelectMode;
|
||||
|
||||
typedef enum {
|
||||
SRC_NTP, /* NTP client/peer */
|
||||
SRC_REFCLOCK /* Rerefence clock */
|
||||
|
||||
Reference in New Issue
Block a user