ntp: add configuration ID to sources

Provide an ID for each configured NTP source to enable tracking and
removing of its corresponding sources, even after they change their
address.
This commit is contained in:
Miroslav Lichvar
2020-06-09 11:59:25 +02:00
parent 428f9e4228
commit 951f14ae06
6 changed files with 66 additions and 14 deletions

View File

@@ -750,7 +750,7 @@ handle_add_source(CMD_Request *rx_message, CMD_Reply *tx_message)
(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);
status = NSR_AddSourceByName(name, port, pool, type, &params);
status = NSR_AddSourceByName(name, port, pool, type, &params, NULL);
switch (status) {
case NSR_Success:
break;