From d29f7b7c70d9cb9d93760abf01a18f578a6c7bcf Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 17 Jun 2020 13:19:20 +0200 Subject: [PATCH] nts: warn about missing NTS support Log a warning message if an NTP source is specified with the nts option and the request fails due to missing NTS support. --- stubs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stubs.c b/stubs.c index fd29a10..0158b3b 100644 --- a/stubs.c +++ b/stubs.c @@ -517,14 +517,16 @@ NNC_PrepareForAuth(NNC_Instance inst) int NNC_GenerateRequestAuth(NNC_Instance inst, NTP_Packet *packet, NTP_PacketInfo *info) { - DEBUG_LOG("NTS support disabled"); + static int logged = 0; + + LOG(logged ? LOGS_DEBUG : LOGS_WARN, "Missing NTS support"); + logged = 1; return 0; } int NNC_CheckResponseAuth(NNC_Instance inst, NTP_Packet *packet, NTP_PacketInfo *info) { - DEBUG_LOG("NTS support disabled"); return 0; }