]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: print warning when source is added with unknown key
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Mar 2014 13:29:12 +0000 (14:29 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 21 Mar 2014 13:36:51 +0000 (14:36 +0100)
ntp_core.c

index e64878bbec2341ee8b6d6f74be54ddcbf211cfbc..4539cf53f146d4c533e9c02de40ca7b9f3d1a25c 100644 (file)
@@ -309,6 +309,10 @@ NCR_GetInstance(NTP_Remote_Address *remote_addr, NTP_Source_Type type, SourcePar
   } else {
     result->do_auth = 1;
     result->auth_key_id = params->authkey;
+    if (!KEY_KeyKnown(result->auth_key_id)) {
+      LOG(LOGS_WARN, LOGF_NtpCore, "Source %s added with unknown key %lu",
+          UTI_IPToString(&result->remote_addr.ip_addr), result->auth_key_id);
+    }
   }
 
   result->max_delay = params->max_delay;