mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
Merge pull request #1281 from waja/github1218
This commit is contained in:
commit
ee7b68050c
2 changed files with 7 additions and 3 deletions
|
|
@ -326,3 +326,4 @@ Mikael Falkvidd
|
|||
Patric Wust
|
||||
Julius Kriukas
|
||||
Patrick McAndrew
|
||||
Alexander Wittig
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ main (int argc, char **argv)
|
|||
timeout_interval_dig = timeout_interval / number_tries + number_tries;
|
||||
|
||||
/* get the command to run */
|
||||
xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d",
|
||||
PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig);
|
||||
xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d",
|
||||
PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig);
|
||||
|
||||
alarm (timeout_interval);
|
||||
gettimeofday (&tv, NULL);
|
||||
|
|
@ -296,7 +296,10 @@ process_arguments (int argc, char **argv)
|
|||
dns_server = argv[c];
|
||||
}
|
||||
else {
|
||||
dns_server = strdup ("127.0.0.1");
|
||||
if (strcmp(query_transport,"-6") == 0)
|
||||
dns_server = strdup("::1");
|
||||
else
|
||||
dns_server = strdup ("127.0.0.1");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue