mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
allow check to proceed using servers from resolv.conf
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@290 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
3c9fc747fc
commit
e04ceb973c
1 changed files with 6 additions and 6 deletions
|
|
@ -352,22 +352,22 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
c = optind;
|
||||
if (query_address[0] == 0) {
|
||||
if (is_host (argv[c]) == FALSE) {
|
||||
if (strlen(query_address)==0 && c<argc) {
|
||||
if (is_host(argv[c])==FALSE) {
|
||||
printf ("Invalid name/address: %s\n\n", argv[c]);
|
||||
return ERROR;
|
||||
}
|
||||
if (strlen (argv[c]) >= ADDRESS_LENGTH)
|
||||
if (strlen(argv[c])>=ADDRESS_LENGTH)
|
||||
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
|
||||
strcpy (query_address, argv[c++]);
|
||||
}
|
||||
|
||||
if (dns_server[0] == 0) {
|
||||
if (is_host (argv[c]) == FALSE) {
|
||||
if (strlen(dns_server)==0 && c<argc) {
|
||||
if (is_host(argv[c]) == FALSE) {
|
||||
printf ("Invalid name/address: %s\n\n", argv[c]);
|
||||
return ERROR;
|
||||
}
|
||||
if (strlen (argv[c]) >= ADDRESS_LENGTH)
|
||||
if (strlen(argv[c]) >= ADDRESS_LENGTH)
|
||||
terminate (STATE_UNKNOWN, "Input buffer overflow\n");
|
||||
strcpy (dns_server, argv[c++]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue