mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
3919. [bug] dig: continue to next line if a address lookup fails
in batch mode. [RT #36755]
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -1,5 +1,8 @@
|
||||
3919. [doc] Added doc for masterfile-style. [RT #36823]
|
||||
3920. [doc] Added doc for masterfile-style. [RT #36823]
|
||||
|
||||
3919. [bug] dig: continue to next line if a address lookup fails
|
||||
in batch mode. [RT #36755]
|
||||
|
||||
3918. [doc] Update check-spf documentation. [RT #36910]
|
||||
|
||||
3917. [bug] dig, nslookup and host now continue on names that are
|
||||
|
@@ -1677,7 +1677,8 @@ preparse_args(int argc, char **argv) {
|
||||
|
||||
static void
|
||||
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
int argc, char **argv) {
|
||||
int argc, char **argv)
|
||||
{
|
||||
isc_result_t result;
|
||||
isc_textregion_t tr;
|
||||
isc_boolean_t firstarg = ISC_TRUE;
|
||||
@@ -1771,7 +1772,24 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
if (strncmp(rv[0], "%", 1) == 0)
|
||||
break;
|
||||
if (rv[0][0] == '@') {
|
||||
addresscount = getaddresses(lookup, &rv[0][1], NULL);
|
||||
|
||||
if (is_batchfile && !config_only) {
|
||||
addresscount = getaddresses(lookup, &rv[0][1],
|
||||
&result);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "couldn't get address "
|
||||
"for '%s': %s: skipping "
|
||||
"lookup\n", &rv[0][1],
|
||||
isc_result_totext(result));
|
||||
if (ISC_LINK_LINKED(lookup, link))
|
||||
ISC_LIST_DEQUEUE(lookup_list,
|
||||
lookup, link);
|
||||
destroy_lookup(lookup);
|
||||
return;
|
||||
}
|
||||
} else
|
||||
addresscount = getaddresses(lookup, &rv[0][1],
|
||||
NULL);
|
||||
} else if (rv[0][0] == '+') {
|
||||
plus_option(&rv[0][1], is_batchfile,
|
||||
lookup);
|
||||
|
Reference in New Issue
Block a user