mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 18:32:10 -04:00
1916. [func] host/nslookup now continue (default)/fail on SERVFAIL.
[RT #15006]
This commit is contained in:
parent
a268fec7f5
commit
3d711f2f75
5 changed files with 47 additions and 7 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
1916. [func] host/nslookup now continue (default)/fail on SERVFAIL.
|
||||
[RT #15006]
|
||||
|
||||
1915. [func] dig now has a '-q queryname' and '+showsearch' options.
|
||||
[RT #15034]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.104 2005/07/04 03:03:20 marka Exp $ */
|
||||
/* $Id: host.c,v 1.105 2005/08/25 00:31:31 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -124,6 +124,7 @@ show_usage(void) {
|
|||
" -N changes the number of dots allowed before root lookup is done\n"
|
||||
" -r disables recursive processing\n"
|
||||
" -R specifies number of retries for UDP packets\n"
|
||||
" -s a SERVFAIL response should stop query\n"
|
||||
" -t specifies the query type\n"
|
||||
" -T enables TCP/IP mode\n"
|
||||
" -v enables verbose output\n"
|
||||
|
|
@ -525,7 +526,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static const char * optstring = "46ac:dilnm:rt:vwCDN:R:TW:";
|
||||
static const char * optstring = "46ac:dilnm:rst:vwCDN:R:TW:";
|
||||
|
||||
static void
|
||||
pre_parse_args(int argc, char **argv) {
|
||||
|
|
@ -553,6 +554,7 @@ pre_parse_args(int argc, char **argv) {
|
|||
case 'l': break;
|
||||
case 'n': break;
|
||||
case 'r': break;
|
||||
case 's': break;
|
||||
case 't': break;
|
||||
case 'v': break;
|
||||
case 'w': break;
|
||||
|
|
@ -586,6 +588,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
|
||||
lookup = make_empty_lookup();
|
||||
|
||||
lookup->servfail_stops = ISC_FALSE;
|
||||
lookup->comments = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
||||
switch (c) {
|
||||
case 'l':
|
||||
|
|
@ -726,6 +731,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
} else
|
||||
fatal("can't find IPv6 networking");
|
||||
break;
|
||||
case 's':
|
||||
lookup->servfail_stops = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: host.docbook,v 1.10 2005/07/19 04:55:20 marka Exp $ -->
|
||||
<!-- $Id: host.docbook,v 1.11 2005/08/25 00:31:32 marka Exp $ -->
|
||||
<refentry id="man.host">
|
||||
|
||||
<refentryinfo>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>host</command>
|
||||
<arg><option>-aCdlnrTwv</option></arg>
|
||||
<arg><option>-aCdlnrsTwv</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
|
||||
<arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
|
||||
|
|
@ -222,6 +222,13 @@
|
|||
value for an integer quantity.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-s</option> option tells <command>host</command>
|
||||
<emphasis>not</emphasis> to send the query to the next nameserver
|
||||
if any server responds with a SERVFAIL response, which is the
|
||||
reverse of normal stub resolver behaviour.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-m</option> can be used to set the memory usage debugging
|
||||
flags
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.109 2005/07/12 05:47:18 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.110 2005/08/25 00:31:32 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -50,7 +50,8 @@ static isc_boolean_t short_form = ISC_TRUE,
|
|||
comments = ISC_TRUE, section_question = ISC_TRUE,
|
||||
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
|
||||
section_additional = ISC_TRUE, recurse = ISC_TRUE,
|
||||
aaonly = ISC_FALSE;
|
||||
aaonly = ISC_FALSE, nofail = ISC_TRUE;
|
||||
|
||||
static isc_boolean_t in_use = ISC_FALSE;
|
||||
static char defclass[MXRD] = "IN";
|
||||
static char deftype[MXRD] = "A";
|
||||
|
|
@ -631,6 +632,10 @@ setoption(char *opt) {
|
|||
usesearch = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "sil", 3) == 0) {
|
||||
/* deprecation_msg = ISC_FALSE; */
|
||||
} else if (strncasecmp(opt, "fail", 3) == 0) {
|
||||
nofail=ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "nofail", 3) == 0) {
|
||||
nofail=ISC_TRUE;
|
||||
} else {
|
||||
printf("*** Invalid option: %s\n", opt);
|
||||
}
|
||||
|
|
@ -689,6 +694,8 @@ addlookup(char *opt) {
|
|||
lookup->section_authority = section_authority;
|
||||
lookup->section_additional = section_additional;
|
||||
lookup->new_search = ISC_TRUE;
|
||||
if (nofail)
|
||||
lookup->servfail_stops = ISC_FALSE;
|
||||
ISC_LIST_INIT(lookup->q);
|
||||
ISC_LINK_INIT(lookup, link);
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: nslookup.docbook,v 1.7 2005/05/13 01:35:39 marka Exp $ -->
|
||||
<!-- $Id: nslookup.docbook,v 1.8 2005/08/25 00:31:32 marka Exp $ -->
|
||||
<!--
|
||||
- Copyright (c) 1985, 1989
|
||||
- The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -441,6 +441,21 @@ nslookup -query=hinfo -timeout=10
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>fail</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Try the next nameserver if a nameserver responds with
|
||||
SERVFAIL or a referral (nofail) or terminate query
|
||||
(fail) on such a response.
|
||||
</para>
|
||||
<para>
|
||||
(Default = nofail)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
|
|
|
|||
Loading…
Reference in a new issue