1894. [func] dig: report the number of extra bytes still left in
the packet after processing all the records. 1893. [cleanup] dighost.c: move external declarations into <dig/dig.h>.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
1894. [func] dig: report the number of extra bytes still left in
|
||||
the packet after processing all the records.
|
||||
|
||||
1893. [cleanup] dighost.c: move external declarations into <dig/dig.h>.
|
||||
|
||||
1892. [bug] dnssec-signzone, dnssec-keygen: handle negative debug
|
||||
levels. [RT #14962]
|
||||
|
||||
|
||||
+5
-30
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.204 2005/06/07 00:15:58 marka Exp $ */
|
||||
/* $Id: dig.c,v 1.205 2005/07/04 03:03:20 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
#define ADD_STRING(b, s) { \
|
||||
if (strlen(s) >= isc_buffer_availablelength(b)) \
|
||||
return (ISC_R_NOSPACE); \
|
||||
@@ -60,31 +56,8 @@ extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
#define DIG_MAX_ADDRESSES 20
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern dns_messageid_t id;
|
||||
extern int sendcount;
|
||||
extern int ndots;
|
||||
extern int lookup_counter;
|
||||
extern int exitcode;
|
||||
extern isc_sockaddr_t bind_address;
|
||||
extern char keynametext[MXNAME];
|
||||
extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
#ifdef DIG_SIGCHASE
|
||||
extern char trustedkey[MXNAME];
|
||||
#endif
|
||||
extern dns_tsigkey_t *key;
|
||||
extern isc_boolean_t validated;
|
||||
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_boolean_t debugging, memdebugging;
|
||||
static char *batchname = NULL;
|
||||
static FILE *batchfp = NULL;
|
||||
static char *argv0;
|
||||
@@ -137,8 +110,6 @@ static const char *rcodetext[] = {
|
||||
"BADVERS"
|
||||
};
|
||||
|
||||
extern char *progname;
|
||||
|
||||
/*% print usage */
|
||||
static void
|
||||
print_usage(FILE *fp) {
|
||||
@@ -518,6 +489,9 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
msg->counts[DNS_SECTION_AUTHORITY],
|
||||
msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
}
|
||||
if (msg != query->lookup->sendmsg && extrabytes != 0U)
|
||||
printf(";; WARNING: Messages has %u extra byte%s at "
|
||||
"end\n", extrabytes, extrabytes != 0 ? "s" : "");
|
||||
}
|
||||
|
||||
repopulate_buffer:
|
||||
@@ -606,6 +580,7 @@ buftoosmall:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (headers && query->lookup->comments && !short_form)
|
||||
printf("\n");
|
||||
|
||||
|
||||
+7
-3
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.279 2005/06/19 22:12:31 marka Exp $ */
|
||||
/* $Id: dighost.c,v 1.280 2005/07/04 03:03:20 marka Exp $ */
|
||||
|
||||
/*! \file
|
||||
* \note
|
||||
@@ -91,9 +91,9 @@
|
||||
static lwres_context_t *lwctx = NULL;
|
||||
static lwres_conf_t *lwconf;
|
||||
|
||||
ISC_LIST(dig_lookup_t) lookup_list;
|
||||
dig_lookuplist_t lookup_list;
|
||||
dig_serverlist_t server_list;
|
||||
ISC_LIST(dig_searchlist_t) search_list;
|
||||
dig_searchlistlist_t search_list;
|
||||
|
||||
isc_boolean_t
|
||||
have_ipv4 = ISC_FALSE,
|
||||
@@ -106,6 +106,7 @@ isc_boolean_t
|
||||
is_dst_up = ISC_FALSE;
|
||||
in_port_t port = 53;
|
||||
unsigned int timeout = 0;
|
||||
unsigned int extrabytes;
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_taskmgr_t *taskmgr = NULL;
|
||||
isc_task_t *global_task = NULL;
|
||||
@@ -1906,6 +1907,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
}
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(lookup->q) && qr) {
|
||||
extrabytes = 0;
|
||||
printmessage(ISC_LIST_HEAD(lookup->q), lookup->sendmsg,
|
||||
ISC_TRUE);
|
||||
}
|
||||
@@ -2854,6 +2856,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
check_result(result,"dns_message_getquerytsig");
|
||||
}
|
||||
|
||||
extrabytes = isc_buffer_remaininglength(b);
|
||||
|
||||
debug("after parse");
|
||||
if (l->doing_xfr && l->xfr_q == NULL) {
|
||||
l->xfr_q = query;
|
||||
|
||||
+1
-16
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.103 2005/04/27 04:55:45 sra Exp $ */
|
||||
/* $Id: host.c,v 1.104 2005/07/04 03:03:20 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -42,21 +42,6 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6;
|
||||
extern isc_boolean_t usesearch;
|
||||
extern isc_boolean_t debugging;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int ndots;
|
||||
extern int tries;
|
||||
extern char *progname;
|
||||
extern isc_task_t *global_task;
|
||||
extern int fatalexit;
|
||||
|
||||
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
|
||||
static isc_boolean_t default_lookups = ISC_TRUE;
|
||||
static int seen_error = -1;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.93 2005/06/19 22:45:22 marka Exp $ */
|
||||
/* $Id: dig.h,v 1.94 2005/07/04 03:03:21 marka Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
@@ -230,6 +230,47 @@ struct dig_message {
|
||||
ISC_LINK(dig_message_t) link;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef ISC_LIST(dig_searchlist_t) dig_searchlistlist_t;
|
||||
typedef ISC_LIST(dig_lookup_t) dig_lookuplist_t;
|
||||
|
||||
/*
|
||||
* Externals from dighost.c
|
||||
*/
|
||||
|
||||
extern dig_lookuplist_t lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern dig_searchlistlist_t search_list;
|
||||
extern unsigned int extrabytes;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern dns_messageid_t id;
|
||||
extern int sendcount;
|
||||
extern int ndots;
|
||||
extern int lookup_counter;
|
||||
extern int exitcode;
|
||||
extern isc_sockaddr_t bind_address;
|
||||
extern char keynametext[MXNAME];
|
||||
extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
#ifdef DIG_SIGCHASE
|
||||
extern char trustedkey[MXNAME];
|
||||
#endif
|
||||
extern dns_tsigkey_t *key;
|
||||
extern isc_boolean_t validated;
|
||||
extern isc_taskmgr_t *taskmgr;
|
||||
extern isc_task_t *global_task;
|
||||
extern isc_boolean_t free_now;
|
||||
extern isc_boolean_t debugging, memdebugging;
|
||||
|
||||
extern char *progname;
|
||||
extern int tries;
|
||||
extern int fatalexit;
|
||||
|
||||
/*
|
||||
* Routines in dighost.c.
|
||||
*/
|
||||
|
||||
+1
-14
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.107 2004/09/06 01:24:43 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.108 2005/07/04 03:03:21 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -44,19 +44,6 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t usesearch, debugging;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int tries;
|
||||
extern int lookup_counter;
|
||||
extern isc_task_t *global_task;
|
||||
extern char *progname;
|
||||
|
||||
static isc_boolean_t short_form = ISC_TRUE,
|
||||
tcpmode = ISC_FALSE,
|
||||
identify = ISC_FALSE, stats = ISC_TRUE,
|
||||
|
||||
Reference in New Issue
Block a user