diff options
Diffstat (limited to 'plugins/netutils.c')
| -rw-r--r-- | plugins/netutils.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c index b4c6ff0a..f9933ebd 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c | |||
| @@ -38,11 +38,7 @@ mp_state_enum socket_timeout_state = STATE_CRITICAL; | |||
| 38 | mp_state_enum econn_refuse_state = STATE_CRITICAL; | 38 | mp_state_enum econn_refuse_state = STATE_CRITICAL; |
| 39 | bool was_refused = false; | 39 | bool was_refused = false; |
| 40 | 40 | ||
| 41 | #if USE_IPV6 | ||
| 42 | int address_family = AF_UNSPEC; | 41 | int address_family = AF_UNSPEC; |
| 43 | #else | ||
| 44 | int address_family = AF_INET; | ||
| 45 | #endif | ||
| 46 | 42 | ||
| 47 | /* handles socket timeouts */ | 43 | /* handles socket timeouts */ |
| 48 | void socket_timeout_alarm_handler(int sig) { | 44 | void socket_timeout_alarm_handler(int sig) { |
| @@ -348,7 +344,6 @@ void host_or_die(const char *str) { | |||
| 348 | } | 344 | } |
| 349 | 345 | ||
| 350 | bool is_addr(const char *address) { | 346 | bool is_addr(const char *address) { |
| 351 | #ifdef USE_IPV6 | ||
| 352 | if (address_family == AF_INET && is_inet_addr(address)) { | 347 | if (address_family == AF_INET && is_inet_addr(address)) { |
| 353 | return true; | 348 | return true; |
| 354 | } | 349 | } |
| @@ -356,11 +351,6 @@ bool is_addr(const char *address) { | |||
| 356 | if (address_family == AF_INET6 && is_inet6_addr(address)) { | 351 | if (address_family == AF_INET6 && is_inet6_addr(address)) { |
| 357 | return true; | 352 | return true; |
| 358 | } | 353 | } |
| 359 | #else | ||
| 360 | if (is_inet_addr(address)) { | ||
| 361 | return true; | ||
| 362 | } | ||
| 363 | #endif | ||
| 364 | 354 | ||
| 365 | return false; | 355 | return false; |
| 366 | } | 356 | } |
