From 5afddad0d2d3a6b2263a07652a1c0227f9f6b454 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 21 Mar 2014 14:29:12 +0100 Subject: [PATCH] ntp: print warning when source is added with unknown key --- ntp_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ntp_core.c b/ntp_core.c index e64878b..4539cf5 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -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;