turn off best effort processing in host and add the ability to specify the port

(cherry picked from commit 4a7b9dba61)
This commit is contained in:
Mark Andrews
2020-03-13 12:17:21 +11:00
parent 0af5f5a3ec
commit 8609fcd90a
2 changed files with 17 additions and 1 deletions
+7 -1
View File
@@ -153,6 +153,7 @@ show_usage(void) {
" -l lists all hosts in a domain, using AXFR\n"
" -m set memory debugging flag (trace|record|usage)\n"
" -N changes the number of dots allowed before root lookup is done\n"
" -p specifies the port on the server to query\n"
" -r disables recursive processing\n"
" -R specifies number of retries for UDP packets\n"
" -s a SERVFAIL response should stop query\n"
@@ -598,7 +599,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
return (result);
}
static const char * optstring = "46ac:dilnm:rst:vVwCDN:R:TUW:";
static const char * optstring = "46ac:dilnm:p:rst:vVwCDN:R:TUW:";
/*% version */
static void
@@ -647,6 +648,7 @@ pre_parse_args(int argc, char **argv) {
case 'l': break;
case 'n': break;
case 'N': break;
case 'p': break;
case 'r': break;
case 'R': break;
case 's': break;
@@ -685,6 +687,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
lookup = make_empty_lookup();
lookup->servfail_stops = false;
lookup->besteffort = false;
lookup->comments = false;
short_form = !verbose;
@@ -845,6 +848,9 @@ parse_args(bool is_batchfile, int argc, char **argv) {
case 's':
lookup->servfail_stops = true;
break;
case 'p':
port = atoi(isc_commandline_argument);
break;
}
}
+10
View File
@@ -59,6 +59,7 @@
<arg choice="opt" rep="norepeat"><option>-aCdlnrsTUwv</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="port">port</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">number</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
@@ -215,6 +216,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable class="parameter">port</replaceable></term>
<listitem>
<para>
Specify the port on the server to query. The default is 53.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r</term>
<listitem>