diff options
-rw-r--r-- | plugins-root/check_icmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index e6a00960..dcaceddb 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -64,6 +64,7 @@ const char *email = "devel@monitoring-plugins.org"; | |||
64 | #include <netinet/ip_icmp.h> | 64 | #include <netinet/ip_icmp.h> |
65 | #include <netinet/icmp6.h> | 65 | #include <netinet/icmp6.h> |
66 | #include <arpa/inet.h> | 66 | #include <arpa/inet.h> |
67 | #include <math.h> | ||
67 | 68 | ||
68 | /** sometimes undefined system macros (quite a few, actually) **/ | 69 | /** sometimes undefined system macros (quite a few, actually) **/ |
69 | #ifndef MAXTTL | 70 | #ifndef MAXTTL |
@@ -1099,7 +1100,8 @@ static int wait_for_reply(int sock, u_int t) { | |||
1099 | if (tdiff > (unsigned int)host->rtmax) { | 1100 | if (tdiff > (unsigned int)host->rtmax) { |
1100 | host->rtmax = tdiff; | 1101 | host->rtmax = tdiff; |
1101 | } | 1102 | } |
1102 | if (tdiff < (unsigned int)host->rtmin) { | 1103 | |
1104 | if ((host->rtmin == INFINITY) || (tdiff < (unsigned int)host->rtmin)) { | ||
1103 | host->rtmin = tdiff; | 1105 | host->rtmin = tdiff; |
1104 | } | 1106 | } |
1105 | 1107 | ||