diff options
author | Jan Wagner <waja@cyconet.org> | 2014-07-30 13:39:39 (GMT) |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2014-07-30 13:39:39 (GMT) |
commit | ee7b68050c806c4ceaebabdbf84b741319caacf7 (patch) | |
tree | 32745e5769d82ed0e10e1cdf55d6b49d6d1003b9 /plugins | |
parent | eaedbc260bd10e6273e6bda229175e7bd313ff38 (diff) | |
parent | f28dc3ba200b0e7a59f9a4157a3d83f73fa1071b (diff) | |
download | monitoring-plugins-ee7b68050c806c4ceaebabdbf84b741319caacf7.tar.gz |
Merge pull request #1281 from waja/github1218
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dig.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index d9481f2..d899b11 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -94,8 +94,8 @@ main (int argc, char **argv) | |||
94 | timeout_interval_dig = timeout_interval / number_tries + number_tries; | 94 | timeout_interval_dig = timeout_interval / number_tries + number_tries; |
95 | 95 | ||
96 | /* get the command to run */ | 96 | /* get the command to run */ |
97 | xasprintf (&command_line, "%s @%s -p %d %s -t %s %s %s +tries=%d +time=%d", | 97 | xasprintf (&command_line, "%s %s %s -p %d @%s %s %s +tries=%d +time=%d", |
98 | PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args, query_transport, number_tries, timeout_interval_dig); | 98 | PATH_TO_DIG, dig_args, query_transport, server_port, dns_server, query_address, record_type, number_tries, timeout_interval_dig); |
99 | 99 | ||
100 | alarm (timeout_interval); | 100 | alarm (timeout_interval); |
101 | gettimeofday (&tv, NULL); | 101 | gettimeofday (&tv, NULL); |
@@ -296,7 +296,10 @@ process_arguments (int argc, char **argv) | |||
296 | dns_server = argv[c]; | 296 | dns_server = argv[c]; |
297 | } | 297 | } |
298 | else { | 298 | else { |
299 | dns_server = strdup ("127.0.0.1"); | 299 | if (strcmp(query_transport,"-6") == 0) |
300 | dns_server = strdup("::1"); | ||
301 | else | ||
302 | dns_server = strdup ("127.0.0.1"); | ||
300 | } | 303 | } |
301 | } | 304 | } |
302 | 305 | ||