* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dig.c,v 1.101 2000/09/25 16:14:20 mws Exp $ */
+/* $Id: dig.c,v 1.102 2000/09/25 23:09:56 mws Exp $ */
#include <config.h>
#include <stdlib.h>
" +[no]recursive (Recursive mode)\n"
" +[no]ignore (Don't revert to TCP for TC responses.)"
"\n"
+" +[no]fail (Try next server on SERVFAIL reply)\n"
" +[no]aaonly (Set AA flag in query)\n"
" +[no]adflag (Set AD flag in query)\n"
" +[no]cdflag (Set CD flag in query)\n"
lookup->section_additional = state;
break;
case 'f': /* adflag */
- lookup->adflag = ISC_FALSE;
+ lookup->adflag = state;
break;
default:
goto invalid_option;
goto invalid_option;
}
break;
+ case 'f': /* fail */
+ lookup->next_on_fail = state;
+ break;
case 'i':
switch (tolower(cmd[1])) {
case 'd': /* identify */
show_details = ISC_TRUE;
}
break;
- case 'e': /* recurse */
- lookup->recurse = ISC_TRUE;
- break;
case 'i': /* tries */
if (value == NULL)
goto need_value;
default:
goto invalid_option;
}
+ break;
default:
goto invalid_option;
}
+ break;
case 'v': /* vc */
if (!is_batchfile)
lookup->tcp_mode = state;
exit(0);
break;
case 'm':
- isc_mem_debugging = ISC_MEM_DEBUGTRACE;
+ isc_mem_debugging = ISC_MEM_DEBUGTRACE | ISC_MEM_DEBUGRECORD;
return (ISC_FALSE);
break;
case 'n':
(dig_server_t *)s2, link);
isc_mem_free(mctx, s2);
}
+ if (isc_mem_debugging != 0)
+ isc_mem_stats(mctx, stderr);
isc_mem_free(mctx, default_lookup);
if (batchname != NULL) {
if (batchfp != stdin)
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.133 2000/09/22 23:21:32 mws Exp $ */
+/* $Id: dighost.c,v 1.134 2000/09/25 23:09:57 mws Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
looknew->trace_root = ISC_FALSE;
looknew->identify = ISC_FALSE;
looknew->ignore = ISC_FALSE;
+ looknew->next_on_fail = ISC_FALSE;
looknew->udpsize = 0;
looknew->recurse = ISC_TRUE;
looknew->aaonly = ISC_FALSE;
looknew->trace_root = lookold->trace_root;
looknew->identify = lookold->identify;
looknew->ignore = lookold->ignore;
+ looknew->next_on_fail = lookold->next_on_fail;
looknew->udpsize = lookold->udpsize;
looknew->recurse = lookold->recurse;
looknew->aaonly = lookold->aaonly;
UNLOCK_LOOKUP;
return;
}
+ if ((msg->rcode == dns_rcode_servfail) &&
+ l->next_on_fail) {
+ dig_query_t *next = ISC_LIST_NEXT(query, link);
+ if (l->current_query == query)
+ l->current_query = NULL;
+ if (next != NULL) {
+ debug("sending query %lx\n", next);
+ if (l->tcp_mode)
+ send_tcp_connect(next);
+ else
+ send_udp(next);
+ }
+ /*
+ * If our query is at the head of the list and there
+ * is no next, we're the only one left, so fall
+ * through to print the message.
+ */
+ if ((ISC_LIST_HEAD(l->q) != query) ||
+ (ISC_LIST_NEXT(query, link) != NULL)) {
+ printf(";; Got SERVFAIL reply from %s, "
+ "trying next server\n",
+ query->servname);
+ clear_query(query);
+ check_next_lookup(l);
+ dns_message_destroy(&msg);
+ isc_event_free(&event);
+ UNLOCK_LOOKUP;
+ return;
+ }
+ }
if (key != NULL) {
result = dns_tsig_verify(&query->recvbuf, msg,
back, and, if necessary, reproduce behavior in dig9. (RT351)
Remove or fix port number display in places where it is not correctly
-reported (nslookup, in particular). (RT352)
+reported (nslookup, in particular). (RT352) [COMPLETED]
+
+Check text strings for host and nslookup output ov various types.
+
+Check functionality of +search option