mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-22 14:46:57 -04:00
check_dig: takes into account the -4 and -6 switch
Fix automatic DNS server name detection to honor -4 and -6 switches (default to 127.0.0.1 or ::1 respectively, i.e. if -6 is given ::1 is used instead of 127.0.0.1)
This commit is contained in:
parent
8c623b1a43
commit
8d50765653
1 changed files with 4 additions and 1 deletions
|
|
@ -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