summaryrefslogtreecommitdiffstats
path: root/plugins/check_dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r--plugins/check_dns.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 2212122..54ce7d1 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -81,7 +81,6 @@ main (int argc, char **argv)
81 double elapsed_time; 81 double elapsed_time;
82 long microsec; 82 long microsec;
83 struct timeval tv; 83 struct timeval tv;
84 int multi_address;
85 int parse_address = FALSE; /* This flag scans for Address: but only after Name: */ 84 int parse_address = FALSE; /* This flag scans for Address: but only after Name: */
86 output chld_out, chld_err; 85 output chld_out, chld_err;
87 size_t i; 86 size_t i;
@@ -127,7 +126,7 @@ main (int argc, char **argv)
127 if (verbose) 126 if (verbose)
128 puts(chld_out.line[i]); 127 puts(chld_out.line[i]);
129 128
130 if (strstr (chld_out.line[i], ".in-addr.arpa")) { 129 if (strcasestr (chld_out.line[i], ".in-addr.arpa")) {
131 if ((temp_buffer = strstr (chld_out.line[i], "name = "))) 130 if ((temp_buffer = strstr (chld_out.line[i], "name = ")))
132 addresses[n_addresses++] = strdup (temp_buffer + 7); 131 addresses[n_addresses++] = strdup (temp_buffer + 7);
133 else { 132 else {
@@ -249,11 +248,6 @@ main (int argc, char **argv)
249 elapsed_time = (double)microsec / 1.0e6; 248 elapsed_time = (double)microsec / 1.0e6;
250 249
251 if (result == STATE_OK) { 250 if (result == STATE_OK) {
252 if (strchr (address, ',') == NULL)
253 multi_address = FALSE;
254 else
255 multi_address = TRUE;
256
257 result = get_status(elapsed_time, time_thresholds); 251 result = get_status(elapsed_time, time_thresholds);
258 if (result == STATE_OK) { 252 if (result == STATE_OK) {
259 printf ("DNS %s: ", _("OK")); 253 printf ("DNS %s: ", _("OK"));
@@ -395,10 +389,10 @@ process_arguments (int argc, char **argv)
395 switch (c) { 389 switch (c) {
396 case 'h': /* help */ 390 case 'h': /* help */
397 print_help (); 391 print_help ();
398 exit (STATE_OK); 392 exit (STATE_UNKNOWN);
399 case 'V': /* version */ 393 case 'V': /* version */
400 print_revision (progname, NP_VERSION); 394 print_revision (progname, NP_VERSION);
401 exit (STATE_OK); 395 exit (STATE_UNKNOWN);
402 case 'v': /* version */ 396 case 'v': /* version */
403 verbose = TRUE; 397 verbose = TRUE;
404 break; 398 break;