The
.Cm average
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
.Cm minimum
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o'-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+.Ic monitor
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.It Xo Ic restrict address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
* headway is less than the minimum, as well as if the average headway
* is less than eight times the increment.
*/
-int ntp_minpkt = NTP_MINPKT; /* minimum (log 2 s) */
-u_char ntp_minpoll = NTP_MINPOLL; /* increment (log 2 s) */
+int ntp_minpkt = NTP_MINPKT; /* minimum seconds between */
+ /* requests from a client */
+u_char ntp_minpoll = NTP_MINPOLL; /* minimum average log2 seconds */
+ /* between client requests */
/*
* Initialization state. We may be monitoring, we may not. If
mon_getmoremem();
UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
/* Preempt from the MRU list if old enough. */
- } else if (ntp_random() / (2. * FRAC) >
+ } else if (ntp_random() * 2. / FRAC >
(double)oldest_age / mon_age) {
return ~(RES_LIMITED | RES_KOD) & flags;
} else {