diff options
author | mat <mat@FreeBSD.org> | 2018-01-08 21:38:55 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2018-01-08 21:38:55 +0800 |
commit | cb4d4c8c6817aec88d0ddbb30275a7f93f03fc99 (patch) | |
tree | 0a985c229d64ceebf107e74cc34a5ee7442623e8 /net-mgmt | |
parent | 8178b3d08dbbff71b51d76db491787ca2dacc19f (diff) | |
download | freebsd-ports-gnome-cb4d4c8c6817aec88d0ddbb30275a7f93f03fc99.tar.gz freebsd-ports-gnome-cb4d4c8c6817aec88d0ddbb30275a7f93f03fc99.tar.zst freebsd-ports-gnome-cb4d4c8c6817aec88d0ddbb30275a7f93f03fc99.zip |
Fix check_ntp_time.
It periodically returns "Socket timeout" when one of several ntp server
doesn't response.
PR: 224926
Submitted by: admins perceptyx com
Sponsored by: Absolight
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios-plugins/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile index 81f05262db81..68c4260afd14 100644 --- a/net-mgmt/nagios-plugins/Makefile +++ b/net-mgmt/nagios-plugins/Makefile @@ -3,7 +3,7 @@ PORTNAME= nagios-plugins PORTVERSION= 2.2.1 -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.nagios-plugins.org/download/ \ diff --git a/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c b/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c new file mode 100644 index 000000000000..daa43daf30be --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-plugins-check_ntp_time.c @@ -0,0 +1,15 @@ +Obtained from: +https://github.com/nagios-plugins/nagios-plugins/commit/df485c74f582708d6ce37cdf99880fe75215498a + +--- plugins/check_ntp_time.c.orig 2018-01-04 12:59:01.422087000 -0800 ++++ plugins/check_ntp_time.c 2018-01-04 13:05:56.317152000 -0800 +@@ -415,6 +415,9 @@ + } + } + /* lather, rinse, repeat. */ ++ /* break if we have one response but other ntp servers doesn't response */ ++ /* greater than timeout_interval/2 */ ++ if (servers_completed && now_time-start_ts > timeout_interval/2) break; + } + + if (one_read == 0) { |