mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 22:32:07 -04:00
1390. [func] host now supports ixfr.
developer: marka reviewer: jinmei
This commit is contained in:
parent
2359764de0
commit
b8fff4f0d7
3 changed files with 27 additions and 10 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
1390. [func] host now supports ixfr.
|
||||
|
||||
1389. [bug] named could fail to rotate long log files. [RT #3666]
|
||||
|
||||
1388. [port] irix: check for sys/sysctl.h and NET_RT_IFLIST before
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.87 2002/09/26 11:17:06 jinmei Exp $ */
|
||||
/* $Id: host.c,v 1.88 2002/10/17 23:44:35 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -500,6 +500,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
isc_result_t result = ISC_R_SUCCESS;
|
||||
dns_rdatatype_t rdtype;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_uint32_t serial = 0;
|
||||
|
||||
UNUSED(is_batchfile);
|
||||
|
||||
|
|
@ -522,10 +523,19 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
lookup->recurse = ISC_FALSE;
|
||||
break;
|
||||
case 't':
|
||||
tr.base = isc_commandline_argument;
|
||||
tr.length = strlen(isc_commandline_argument);
|
||||
result = dns_rdatatype_fromtext(&rdtype,
|
||||
if (strncasecmp(isc_commandline_argument,
|
||||
"ixfr=", 5) == 0) {
|
||||
rdtype = dns_rdatatype_ixfr;
|
||||
/* XXXMPA add error checking */
|
||||
serial = strtoul(isc_commandline_argument + 5,
|
||||
NULL, 10);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else {
|
||||
tr.base = isc_commandline_argument;
|
||||
tr.length = strlen(isc_commandline_argument);
|
||||
result = dns_rdatatype_fromtext(&rdtype,
|
||||
(isc_textregion_t *)&tr);
|
||||
}
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatalexit = 2;
|
||||
|
|
@ -541,7 +551,10 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
list_type = dns_rdatatype_any;
|
||||
short_form = ISC_FALSE;
|
||||
lookup->tcp_mode = ISC_TRUE;
|
||||
} else
|
||||
} else if (rdtype == dns_rdatatype_ixfr) {
|
||||
lookup->ixfr_serial = serial;
|
||||
list_type = rdtype;
|
||||
} else
|
||||
list_type = rdtype;
|
||||
list_addresses = ISC_FALSE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: host.docbook,v 1.3 2002/07/25 05:46:07 marka Exp $ -->
|
||||
<!-- $Id: host.docbook,v 1.4 2002/10/17 23:44:35 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
|
||||
|
|
@ -103,9 +103,9 @@ output.
|
|||
<para>
|
||||
List mode is selected by the <option>-l</option> option. This makes
|
||||
<command>host</command> perform a zone transfer for zone
|
||||
<parameter>name</parameter>. The argument is provided for
|
||||
compatibility with older implemementations. This option is equivalent
|
||||
to making a query of type AXFR.
|
||||
<parameter>name</parameter>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <option>-a</option>
|
||||
all records will be printed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
|
@ -163,7 +163,9 @@ type. By default it looks for A records, but if the
|
|||
<option>-C</option> option was given, queries will be made for SOA
|
||||
records, and if <parameter>name</parameter> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <command>host</command> will
|
||||
query for PTR records.
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
|
|
|||
Loading…
Reference in a new issue