From b76ea642633b7a7bd9448fad2916b757fe050338 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 5 Jan 2017 11:29:55 +0100 Subject: [PATCH] ntp: log warning when KoD RATE is received in non-burst mode --- ntp_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntp_core.c b/ntp_core.c index ed8c85f..a55e228 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -1606,13 +1606,14 @@ receive_packet(NCR_Instance inst, NTP_Local_Address *local_addr, UTI_DiffTimespecsToDouble(&inst->local_rx.ts, &inst->local_tx.ts)); if (kod_rate) { + LOG(LOGS_WARN, LOGF_NtpCore, "Received KoD RATE from %s", + UTI_IPToString(&inst->remote_addr.ip_addr)); + /* Back off for a while and stop ongoing burst */ delay_time += 4 * (1UL << inst->minpoll); if (inst->opmode == MD_BURST_WAS_OFFLINE || inst->opmode == MD_BURST_WAS_ONLINE) { inst->burst_good_samples_to_go = 0; - LOG(LOGS_WARN, LOGF_NtpCore, "Received KoD RATE from %s, burst sampling stopped", - UTI_IPToString(&inst->remote_addr.ip_addr)); } }