diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.in | 26 | ||||
-rw-r--r-- | plugins/netutils.c | 4 |
3 files changed, 23 insertions, 8 deletions
@@ -30,6 +30,7 @@ This file documents the major additions and syntax changes between releases. | |||
30 | The "negate" utility can now remap custom states | 30 | The "negate" utility can now remap custom states |
31 | Check_radius now supports radiusclient-ng | 31 | Check_radius now supports radiusclient-ng |
32 | Check_by_ssh now supports multiline output | 32 | Check_by_ssh now supports multiline output |
33 | IPv6 support can now be disabled using ./configure --without-ipv6 | ||
33 | 34 | ||
34 | 1.4.9 4th June 2006 | 35 | 1.4.9 4th June 2006 |
35 | Inclusion of contrib/check_cluster2 as check_cluster with some improvements | 36 | Inclusion of contrib/check_cluster2 as check_cluster with some improvements |
diff --git a/configure.in b/configure.in index ee928d4..5153b1c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -275,9 +275,15 @@ else | |||
275 | AC_SUBST(MYSQLCFLAGS) | 275 | AC_SUBST(MYSQLCFLAGS) |
276 | fi | 276 | fi |
277 | 277 | ||
278 | AC_ARG_WITH([ipv6], | ||
279 | [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], | ||
280 | [], [with_ipv6=check]) | ||
281 | |||
278 | dnl Check for AF_INET6 support - unistd.h required for Darwin | 282 | dnl Check for AF_INET6 support - unistd.h required for Darwin |
279 | AC_CACHE_CHECK([for IPv6 support], with_ipv6, [ | 283 | if test "$with_ipv6" != "no"; then |
280 | AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H | 284 | AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [ |
285 | AC_TRY_COMPILE( | ||
286 | [#ifdef HAVE_UNISTD_H | ||
281 | #include <unistd.h> | 287 | #include <unistd.h> |
282 | #endif | 288 | #endif |
283 | #include <netinet/in.h> | 289 | #include <netinet/in.h> |
@@ -288,12 +294,16 @@ AC_CACHE_CHECK([for IPv6 support], with_ipv6, [ | |||
288 | sin6.sin6_family = AF_INET6; | 294 | sin6.sin6_family = AF_INET6; |
289 | sin6.sin6_port = 587; | 295 | sin6.sin6_port = 587; |
290 | p = &sin6.sin6_addr;], | 296 | p = &sin6.sin6_addr;], |
291 | [with_ipv6=yes], | 297 | [np_cv_sys_ipv6=yes], |
292 | [with_ipv6=no]) | 298 | [np_cv_sys_ipv6=no]) |
293 | ]) | 299 | ]) |
294 | 300 | if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then | |
295 | if test x"$with_ipv6" != xno ; then | 301 | AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed]) |
296 | AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) | 302 | fi |
303 | if test "$np_cv_sys_ipv6" = "yes"; then | ||
304 | AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) | ||
305 | fi | ||
306 | with_ipv6="$np_cv_sys_ipv6" | ||
297 | fi | 307 | fi |
298 | 308 | ||
299 | 309 | ||
diff --git a/plugins/netutils.c b/plugins/netutils.c index e6ffc54..7bf2254 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c | |||
@@ -39,7 +39,11 @@ | |||
39 | unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; | 39 | unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; |
40 | int econn_refuse_state = STATE_CRITICAL; | 40 | int econn_refuse_state = STATE_CRITICAL; |
41 | int was_refused = FALSE; | 41 | int was_refused = FALSE; |
42 | #if USE_IPV6 | ||
42 | int address_family = AF_UNSPEC; | 43 | int address_family = AF_UNSPEC; |
44 | #else | ||
45 | int address_family = AF_INET; | ||
46 | #endif | ||
43 | 47 | ||
44 | /* handles socket timeouts */ | 48 | /* handles socket timeouts */ |
45 | void | 49 | void |