Your message dated Wed, 4 Nov 2026 16:56:46 +0100
with message-id <[email protected]>
and subject line nagios-plugins-basic: The nagios plugin check_ntp_time does 
not recognize KoD packages from the ntpserver
has caused the Debian Bug report #764603,
regarding nagios-plugins-basic: The nagios plugin check_ntp_time does not 
recognize KoD packages from the ntpserver
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
764603: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764603
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nagios-plugins-basic
Version: 1.4.16-1
Severity: important
Tags: upstream patch

Dear Maintainer,

After hardening the ntp configuration, I noticed that the nagios check was
no longer functioning. The line I added to ntp.conf was:
   restrict default limited kod nomodify notrap nopeer noquery

The culprit turned out to be the 'kod' option in the restrict line.

The nagios check does not understand the contents of the 'KoD' package and
only reports that the server stratum is 0. Which is part of the KoD packet.

I created a patch to deal with this situation. The patch is in the
attachment.

-- System Information:
Debian Release: 7.5
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages nagios-plugins-basic depends on:
ii  iputils-ping           3:20101006-1+b1
ii  libc6                  2.13-38+deb7u1
ii  libssl1.0.0            1.0.1e-2+deb7u11
ii  nagios-plugins-common  1.4.16-1
ii  procps                 1:3.3.3-3
ii  ucf                    3.0025+nmu3

nagios-plugins-basic recommends no packages.

Versions of packages nagios-plugins-basic suggests:
pn  nagios3 | icinga  <none>

-- no debconf information
--- check_ntp_time.c.orig	2012-06-27 19:32:47.000000000 +0200
+++ check_ntp_time.c	2014-10-09 15:48:44.000000000 +0200
@@ -393,6 +393,21 @@
 				read(ufds[i].fd, &req[i], sizeof(ntp_message));
 				gettimeofday(&recv_time, NULL);
 				DBG(print_ntp_message(&req[i]));
+				/*
+				 * Check for a KoD (rate limiting) response, cease and decist.
+				 */
+				if ((LI(req[i].flags) == LI_ALARM) && (req[i].stratum == 0) &&
+						!memcmp("RATE", &(req[i].refid), 4)) {
+					if (verbose) {
+						printf("rate limit response from server.\n");
+					}
+					servers[i].num_responses=AVG_NUM;
+					servers[i].waiting=0;
+					servers_readable--;
+					servers_completed++;
+					continue;
+				}
+
 				respnum=servers[i].num_responses++;
 				servers[i].offset[respnum]=calc_offset(&req[i], &recv_time);
 				if(verbose) {

--- End Message ---
--- Begin Message ---
This is not an issue that will be fixed by the package maintainer.

Kind Regards,

Bas

--
 PGP Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

--- End Message ---

Reply via email to