diff --git a/bin/dig/dig.c b/bin/dig/dig.c index d90d24e057..81bba499b8 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.90 2000/09/12 23:23:49 gson Exp $ */ +/* $Id: dig.c,v 1.91 2000/09/13 00:03:25 mws Exp $ */ #include #include @@ -156,6 +156,8 @@ show_usage(void) { " +[no]search (Set whether to use searchlist)\n" " +[no]defname (Set whether to use default domain)\n" " +[no]recursive (Recursive mode)\n" +" +[no]ignore (Don't revert to TCP for TC responses.)" +"\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" @@ -785,6 +787,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only, lookup->identify = ISC_TRUE; } else if (strncmp(rv[0], "+noid", 5) == 0) { lookup->identify = ISC_FALSE; + } else if (strncmp(rv[0], "+i", 2) == 0) { + lookup->ignore = ISC_TRUE; + } else if (strncmp(rv[0], "+noi", 4) == 0) { + lookup->ignore = ISC_FALSE; } else if (strncmp(rv[0], "+com", 4) == 0) { lookup->comments = ISC_TRUE; forcecomment = ISC_TRUE; diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index c9aa44272f..97a06ca59a 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.120 2000/09/12 22:42:17 mws Exp $ */ +/* $Id: dighost.c,v 1.121 2000/09/13 00:03:27 mws Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -281,6 +281,7 @@ make_empty_lookup(void) { looknew->trace = ISC_FALSE; looknew->trace_root = ISC_FALSE; looknew->identify = ISC_FALSE; + looknew->ignore = ISC_FALSE; looknew->udpsize = 0; looknew->recurse = ISC_TRUE; looknew->aaonly = ISC_FALSE; @@ -331,6 +332,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) { looknew->trace = lookold->trace; looknew->trace_root = lookold->trace_root; looknew->identify = lookold->identify; + looknew->ignore = lookold->ignore; looknew->udpsize = lookold->udpsize; looknew->recurse = lookold->recurse; looknew->aaonly = lookold->aaonly; @@ -1990,7 +1992,8 @@ recv_done(isc_task_t *task, isc_event_t *event) { UNLOCK_LOOKUP; return; } - if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) { + if (((msg->flags & DNS_MESSAGEFLAG_TC) != 0) + && ! l->ignore) { printf(";; Truncated, retrying in TCP mode.\n"); n = requeue_lookup(l, ISC_TRUE); n->tcp_mode = ISC_TRUE; @@ -2286,7 +2289,7 @@ do_lookup_tcp(dig_lookup_t *lookup) { (isc_sockaddr_pf(&query->sockaddr) != isc_sockaddr_pf(&bind_address))) { printf (";; Skipping server %s, incompatable " - "address family\n", &query->servname); + "address family\n", query->servname); continue; query->waiting_connect = ISC_FALSE; } diff --git a/bin/dig/include/dig/dig.h b/bin/dig/include/dig/dig.h index 4a6d739cdd..85932e9f66 100644 --- a/bin/dig/include/dig/dig.h +++ b/bin/dig/include/dig/dig.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.h,v 1.43 2000/08/14 19:11:05 bwelling Exp $ */ +/* $Id: dig.h,v 1.44 2000/09/13 00:03:28 mws Exp $ */ #ifndef DIG_H #define DIG_H @@ -76,6 +76,7 @@ struct dig_lookup { doing_xfr, ns_search_only, identify, + ignore, recurse, aaonly, adflag,