mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-02 21:40:43 -05:00
Remove name limits and counter from dig; there's no obvious way to count
names out of message_parse when PRESERVE_ORDER is set.
This commit is contained in:
parent
369bb68c2c
commit
04ab4ecb27
3 changed files with 6 additions and 23 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.125 2000/11/07 01:29:34 mws Exp $ */
|
||||
/* $Id: dig.c,v 1.126 2000/11/08 00:47:15 mws Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -75,7 +75,6 @@ extern isc_taskmgr_t *taskmgr;
|
|||
extern isc_task_t *global_task;
|
||||
extern isc_boolean_t free_now;
|
||||
dig_lookup_t *default_lookup = NULL;
|
||||
extern isc_uint32_t name_limit;
|
||||
extern isc_uint32_t rr_limit;
|
||||
|
||||
extern isc_boolean_t debugging, memdebugging;
|
||||
|
|
@ -207,8 +206,8 @@ received(int bytes, int frmsize, char *frm, dig_query_t *query) {
|
|||
time(&tnow);
|
||||
printf(";; WHEN: %s", ctime(&tnow));
|
||||
if (query->lookup->doing_xfr) {
|
||||
printf(";; XFR size: %d names, %d rrs\n",
|
||||
query->name_count, query->rr_count);
|
||||
printf(";; XFR size: %d records\n",
|
||||
query->rr_count);
|
||||
} else {
|
||||
printf(";; MSG SIZE rcvd: %d\n", bytes);
|
||||
|
||||
|
|
@ -710,13 +709,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
|||
break;
|
||||
case 'n':
|
||||
switch (cmd[1]) {
|
||||
case 'a': /* namelimit */
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
name_limit = atoi(value);
|
||||
break;
|
||||
case 'd': /* ndots */
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.159 2000/10/31 03:21:36 marka Exp $ */
|
||||
/* $Id: dighost.c,v 1.160 2000/11/08 00:47:16 mws Exp $ */
|
||||
|
||||
/*
|
||||
* Notice to programmers: Do not use this code as an example of how to
|
||||
|
|
@ -124,7 +124,6 @@ isc_boolean_t memdebugging = ISC_FALSE;
|
|||
char *progname = NULL;
|
||||
isc_mutex_t lookup_lock;
|
||||
dig_lookup_t *current_lookup = NULL;
|
||||
isc_uint32_t name_limit = INT_MAX;
|
||||
isc_uint32_t rr_limit = INT_MAX;
|
||||
|
||||
/*
|
||||
|
|
@ -1512,7 +1511,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
query->second_rr_rcvd = ISC_FALSE;
|
||||
query->second_rr_serial = 0;
|
||||
query->servname = serv->servername;
|
||||
query->name_count = 0;
|
||||
query->rr_count = 0;
|
||||
ISC_LINK_INIT(query, link);
|
||||
ISC_LIST_INIT(query->recvlist);
|
||||
|
|
@ -2100,7 +2098,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
|
|||
name = NULL;
|
||||
dns_message_currentname(msg, DNS_SECTION_ANSWER,
|
||||
&name);
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
result = dns_rdataset_first(rdataset);
|
||||
|
|
@ -2216,12 +2214,6 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
|
|||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
}
|
||||
query->name_count++;
|
||||
if (query->name_count >= name_limit) {
|
||||
debug("name_count(%d) > name_limit(%d)",
|
||||
query->name_count, name_limit);
|
||||
atlimit = ISC_TRUE;
|
||||
}
|
||||
result = dns_message_nextname(msg, DNS_SECTION_ANSWER);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
if (atlimit) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.55 2000/10/23 23:13:21 mws Exp $ */
|
||||
/* $Id: dig.h,v 1.56 2000/11/08 00:47:18 mws Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
|
|
@ -144,7 +144,6 @@ struct dig_query {
|
|||
isc_uint32_t first_rr_serial;
|
||||
isc_uint32_t second_rr_serial;
|
||||
isc_uint32_t rr_count;
|
||||
isc_uint32_t name_count;
|
||||
char *servname;
|
||||
isc_bufferlist_t sendlist,
|
||||
recvlist,
|
||||
|
|
|
|||
Loading…
Reference in a new issue