ntp: enable NTS support

Add an option to enable NTS for an NTP source. Check for NTS-specific
extension fields and pass the packets to the NTS-NTP code in order to
enable the NTS client and server.
This commit is contained in:
Miroslav Lichvar
2020-02-04 15:27:24 +01:00
parent 6043632f80
commit c41508723f
7 changed files with 74 additions and 1 deletions

View File

@@ -743,6 +743,8 @@ handle_add_source(CMD_Request *rx_message, CMD_Reply *tx_message)
(ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_NOSELECT ? SRC_SELECT_NOSELECT : 0) |
(ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_TRUST ? SRC_SELECT_TRUST : 0) |
(ntohl(rx_message->data.ntp_source.flags) & REQ_ADDSRC_REQUIRE ? SRC_SELECT_REQUIRE : 0);
params.nts = 0;
params.nts_port = 0;
status = NSR_AddSourceByName(name, port, pool, type, &params);
switch (status) {