]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
nts: warn about missing NTS support
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 17 Jun 2020 11:19:20 +0000 (13:19 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 17 Jun 2020 13:59:29 +0000 (15:59 +0200)
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

diff --git a/stubs.c b/stubs.c
index fd29a10c3ddcf455f93601eb3e7e45e98ffb2314..0158b3b7e6cff3511247f2c0ffa3bc0fb18e450b 100644 (file)
--- 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;
 }