Explorar el Código

Merge branch 'bazzisoft-check-ping-timeout-fix'

madlohe hace 6 años
padre
commit
6d9bc930de
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  1. 1 0
      NEWS
  2. 4 4
      configure.ac

+ 1 - 0
NEWS

@@ -12,6 +12,7 @@ This file documents the major additions and syntax changes between releases.
 	perl dependencies: updated the included Module::Build to work with newer versions of perl (#505)
 	check_icmp: All performance data tags should show when packet loss is 100% (#510)
 	check_dns: Improve error messaging for "connection timed out" and "connected refused" cases (#503) (Barak Shohat)
+	check_ping: Fixed inconsistent timeout behavior (#323, #419) (Barak Shohat)
 
 2.3.1 2019-12-09
 	FIXES

+ 4 - 4
configure.ac

@@ -1119,10 +1119,10 @@ then
 	ac_cv_ping_packets_first=yes
 	AC_MSG_RESULT([$with_ping_command])
 
-elif $PATH_TO_PING -n -U -W 10 -c 1 127.0.0.1 2>/dev/null | \
+elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
 	egrep -i "^round-trip|^rtt" >/dev/null
 then
-	with_ping_command="$PATH_TO_PING -n -U -W %d -c %d %s"
+	with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s"
 	ac_cv_ping_packets_first=yes
 	ac_cv_ping_has_timeout=yes
 	AC_MSG_RESULT([$with_ping_command])
@@ -1243,10 +1243,10 @@ elif test "x$PATH_TO_PING6" != "x"; then
 		ac_cv_ping6_packets_first=yes
 		AC_MSG_RESULT([$with_ping6_command])
 
-	elif $PATH_TO_PING6 -n -U -W 10 -c 1 ::1 2>/dev/null | \
+	elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \
 		egrep -i "^round-trip|^rtt" >/dev/null
 	then
-		with_ping6_command="$PATH_TO_PING6 -n -U -W %d -c %d %s"
+		with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s"
 		ac_cv_ping6_packets_first=yes
 		ac_cv_ping_has_timeout=yes
 		AC_MSG_RESULT([$with_ping6_command])