[Git][NTPsec/ntpsec][master] With the poll interval computation fixed, Mode 6 monitoring can be restored.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Dec 17 14:04:35 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
a6655fd8 by Eric S. Raymond at 2016-12-17T09:01:47-05:00
With the poll interval computation fixed, Mode 6 monitoring can be restored.
- - - - -
3 changed files:
- docs/includes/ntpmon-body.txt
- ntpclients/ntpmon
- ntpd/ntp_proto.c
Changes:
=====================================
docs/includes/ntpmon-body.txt
=====================================
--- a/docs/includes/ntpmon-body.txt
+++ b/docs/includes/ntpmon-body.txt
@@ -19,7 +19,8 @@ adjusts itself to poll at twice the frequency of the shortest
polling interval reported in the last peers response.)
The status bar includes the version string of the server being
-watched and the (local) time at which it was last updated).
+watched, the (local) time at which it was last updated, and the
+current query interval.
^C cleanly terminates the program.
=====================================
ntpclients/ntpmon
=====================================
--- a/ntpclients/ntpmon
+++ b/ntpclients/ntpmon
@@ -190,7 +190,7 @@ if __name__ == '__main__':
pass
# Display all
stdscr.refresh()
- stdscr.timeout(nyquist)
+ stdscr.timeout(nyquist * 1000)
try:
helpmode = False
key = stdscr.getkey()
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -739,6 +739,12 @@ receive(
goto done;
}
+ restrict_mask = ntp_monitor(rbufp, restrict_mask);
+ if (restrict_mask & RES_LIMITED) {
+ sys_limitrejected++;
+ if(!(restrict_mask & RES_KOD)) { goto done; }
+ }
+
if(is_control_packet(rbufp)) {
process_control(rbufp, restrict_mask);
goto done;
@@ -783,12 +789,6 @@ receive(
}
}
- restrict_mask = ntp_monitor(rbufp, restrict_mask);
- if (restrict_mask & RES_LIMITED) {
- sys_limitrejected++;
- if(!(restrict_mask & RES_KOD)) { goto done; }
- }
-
switch(match) {
case AM_FXMIT:
case AM_NEWPASS:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a6655fd849c372807ccd57e3c4c917e4355e1601
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161217/49100d92/attachment.html>
More information about the vc
mailing list