]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: log warning when KoD RATE is received in non-burst mode
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 5 Jan 2017 10:29:55 +0000 (11:29 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 6 Jan 2017 12:12:19 +0000 (13:12 +0100)
ntp_core.c

index ed8c85f4d6b3ccc63ab184537d329882099d5acd..a55e2286a26f63684b2962bc66781bc7eb3bf7af 100644 (file)
@@ -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));
         }
       }