You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
attached you can find a patch which applies to current check_ntp_time. The bug was found by Mathias Kettner.
The patch contains the following changes:
A minor change which makes the AVG_NUM configurable by compiler define.
The more important change: A fix for a bug which caused the check_ntp_time check to always take the first response from ntp and not the avarage since "j" is not increased anywhere. "i" should be used there instead.
/* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
#define AVG_NUM 4
+#endif
/* max size of control message data /
#define MAX_CM_SIZE 468
@@ -422,7 +424,7 @@
} else {
/ finally, calculate the average offset */
for(i=0; i<servers[best_index].num_responses;i++){
1. A minor change which makes the AVG_NUM configurable by compiler define.
2. The more important change: A fix for a bug which caused the check_ntp_time
and check_ntp_time check to always take the first response from ntp and not
the avarage since "j" is not increased anywhere. "i" should be used there
instead.
(Closes: monitoring-plugins#956)
(Closes: monitoring-plugins#1089)
(Closes: monitoring-plugins#1166)
waja
added a commit
to waja/monitoring-plugins
that referenced
this issue
Jan 24, 2014
The more important change: A fix for a bug which caused the check_ntp_time
and check_ntp_time check to always take the first response from ntp and not
the avarage since "j" is not increased anywhere. "i" should be used there
instead.
Partly Closesmonitoring-plugins#956 and Closesmonitoring-plugins#1166Closes: monitoring-plugins#1089
Submitted by larsi- on 2010-04-27 23:08:10
Hello Nagios-Plugins Team,
attached you can find a patch which applies to current check_ntp_time. The bug was found by Mathias Kettner.
The patch contains the following changes:
Kind regards,
Lars
--- check_ntp_time.c.orig 2010-04-27 12:08:08.000000000 +0000
+++ check_ntp_time.c 2010-04-27 12:13:23.000000000 +0000
@@ -55,7 +55,9 @@
void print_usage (void);
/* number of times to perform each request to get a good average. */
+#ifndef AVG_NUM
#define AVG_NUM 4
+#endif
/* max size of control message data /
#define MAX_CM_SIZE 468
@@ -422,7 +424,7 @@
} else {
/ finally, calculate the average offset */
for(i=0; i<servers[best_index].num_responses;i++){
The text was updated successfully, but these errors were encountered: