diff --git a/candm.h b/candm.h index 7c36779..acc6cdf 100644 --- a/candm.h +++ b/candm.h @@ -292,7 +292,8 @@ typedef struct { Float offset; uint32_t flags; int32_t filter_length; - uint32_t reserved[3]; + uint32_t cert_set; + uint32_t reserved[2]; int32_t EOR; } REQ_NTP_Source; diff --git a/client.c b/client.c index f12511b..45239c6 100644 --- a/client.c +++ b/client.c @@ -1100,6 +1100,7 @@ process_cmd_add_source(CMD_Request *msg, char *line) (data.params.sel_options & SRC_SELECT_TRUST ? REQ_ADDSRC_TRUST : 0) | (data.params.sel_options & SRC_SELECT_REQUIRE ? REQ_ADDSRC_REQUIRE : 0)); msg->data.ntp_source.filter_length = htonl(data.params.filter_length); + msg->data.ntp_source.cert_set = htonl(data.params.cert_set); memset(msg->data.ntp_source.reserved, 0, sizeof (msg->data.ntp_source.reserved)); result = 1; diff --git a/cmdmon.c b/cmdmon.c index 6222f60..afdfa6c 100644 --- a/cmdmon.c +++ b/cmdmon.c @@ -735,7 +735,7 @@ handle_add_source(CMD_Request *rx_message, CMD_Reply *tx_message) params.filter_length = ntohl(rx_message->data.ntp_source.filter_length); params.authkey = ntohl(rx_message->data.ntp_source.authkey); params.nts_port = ntohl(rx_message->data.ntp_source.nts_port); - params.cert_set = 0; + params.cert_set = ntohl(rx_message->data.ntp_source.cert_set); params.max_delay = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay); params.max_delay_ratio = UTI_FloatNetworkToHost(rx_message->data.ntp_source.max_delay_ratio); diff --git a/test/simulation/110-chronyc b/test/simulation/110-chronyc index d578bf2..c517249 100755 --- a/test/simulation/110-chronyc +++ b/test/simulation/110-chronyc @@ -101,7 +101,7 @@ limit=1 for chronyc_conf in \ "accheck 1.2.3.4" \ "add peer 10.0.0.0 minpoll 2 maxpoll 6" \ - "add server 10.0.0.0 minpoll 6 maxpoll 10 iburst burst key 1 maxdelay 1e-3 maxdelayratio 10.0 maxdelaydevratio 10.0 mindelay 1e-4 asymmetry 0.5 offset 1e-5 minsamples 6 maxsamples 6 filter 3 offline auto_offline prefer noselect trust require xleave polltarget 20 port 123 presend 7 minstratum 3 version 4" \ + "add server 10.0.0.0 minpoll 6 maxpoll 10 iburst burst key 1 certset 2 maxdelay 1e-3 maxdelayratio 10.0 maxdelaydevratio 10.0 mindelay 1e-4 asymmetry 0.5 offset 1e-5 minsamples 6 maxsamples 6 filter 3 offline auto_offline prefer noselect trust require xleave polltarget 20 port 123 presend 7 minstratum 3 version 4" \ "add server node1.net1.clk" \ "allow 1.2.3.4" \ "allow 1.2" \