mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-04 16:55:31 -04:00
1917. [func] dig now warns if 'RA' is not set in the answer when
'RD' was set in the query. host/nslookup skip servers
that fail to set 'RA' when 'RD' is set unless a server
is explicitly set. [RT #15005]
This commit is contained in:
parent
783db10c34
commit
b8f09dec6c
6 changed files with 37 additions and 15 deletions
5
CHANGES
5
CHANGES
|
|
@ -1,3 +1,8 @@
|
|||
1917. [func] dig now warns if 'RA' is not set in the answer when
|
||||
'RD' was set in the query. host/nslookup skip servers
|
||||
that fail to set 'RA' when 'RD' is set unless a server
|
||||
is explicitly set. [RT #15005]
|
||||
|
||||
1916. [func] host/nslookup now continue (default)/fail on SERVFAIL.
|
||||
[RT #15006]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.186.18.19 2005/08/25 00:20:59 marka Exp $ */
|
||||
/* $Id: dig.c,v 1.186.18.20 2005/08/25 00:43:24 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -490,6 +490,11 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||
msg->counts[DNS_SECTION_ANSWER],
|
||||
msg->counts[DNS_SECTION_AUTHORITY],
|
||||
msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0 &&
|
||||
(msg->flags & DNS_MESSAGEFLAG_RA) == 0)
|
||||
printf(";; WARNING: recusion requested "
|
||||
"but not available\n");
|
||||
}
|
||||
if (msg != query->lookup->sendmsg && extrabytes != 0U)
|
||||
printf(";; WARNING: Messages has %u extra byte%s at "
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.259.18.21 2005/08/25 00:20:59 marka Exp $ */
|
||||
/* $Id: dighost.c,v 1.259.18.22 2005/08/25 00:43:25 marka Exp $ */
|
||||
|
||||
/*! \file
|
||||
* \note
|
||||
|
|
@ -96,6 +96,7 @@ dig_serverlist_t server_list;
|
|||
dig_searchlistlist_t search_list;
|
||||
|
||||
isc_boolean_t
|
||||
check_ra = ISC_FALSE,
|
||||
have_ipv4 = ISC_FALSE,
|
||||
have_ipv6 = ISC_FALSE,
|
||||
specified_source = ISC_FALSE,
|
||||
|
|
@ -2789,8 +2790,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
|||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0
|
||||
&& !l->ignore && !l->tcp_mode) {
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0 &&
|
||||
!l->ignore && !l->tcp_mode) {
|
||||
printf(";; Truncated, retrying in TCP mode.\n");
|
||||
n = requeue_lookup(l, ISC_TRUE);
|
||||
n->tcp_mode = ISC_TRUE;
|
||||
|
|
@ -2803,7 +2804,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
|||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
if (msg->rcode == dns_rcode_servfail && !l->servfail_stops) {
|
||||
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
|
||||
(check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
|
||||
{
|
||||
dig_query_t *next = ISC_LIST_NEXT(query, link);
|
||||
if (l->current_query == query)
|
||||
l->current_query = NULL;
|
||||
|
|
@ -2821,9 +2824,13 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
|||
*/
|
||||
if ((ISC_LIST_HEAD(l->q) != query) ||
|
||||
(ISC_LIST_NEXT(query, link) != NULL)) {
|
||||
printf(";; Got SERVFAIL reply from %s, "
|
||||
"trying next server\n",
|
||||
query->servname);
|
||||
if( l->comments == ISC_TRUE )
|
||||
printf(";; Got %s from %s, "
|
||||
"trying next server\n",
|
||||
msg->rcode == dns_rcode_servfail ?
|
||||
"SERVFAIL reply" :
|
||||
"recursion not available",
|
||||
query->servname);
|
||||
clear_query(query);
|
||||
check_next_lookup(l);
|
||||
dns_message_destroy(&msg);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.94.18.10 2005/08/25 00:33:35 marka Exp $ */
|
||||
/* $Id: host.c,v 1.94.18.11 2005/08/25 00:43:25 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -748,7 +748,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||
set_nameserver(argv[isc_commandline_index+1]);
|
||||
debug("server is %s", argv[isc_commandline_index+1]);
|
||||
listed_server = ISC_TRUE;
|
||||
}
|
||||
} else
|
||||
check_ra = ISC_TRUE;
|
||||
|
||||
lookup->pending = ISC_FALSE;
|
||||
if (get_reverse(store, sizeof(store), hostname,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.82.18.13 2005/08/25 00:21:01 marka Exp $ */
|
||||
/* $Id: dig.h,v 1.82.18.14 2005/08/25 00:43:26 marka Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
|
|
@ -243,7 +243,7 @@ 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,
|
||||
extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, showsearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.101.18.8 2005/08/25 00:33:36 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.101.18.9 2005/08/25 00:43:25 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -734,6 +734,7 @@ get_next_command(void) {
|
|||
(strcasecmp(ptr, "lserver") == 0)) {
|
||||
isc_app_block();
|
||||
set_nameserver(arg);
|
||||
check_ra = ISC_FALSE;
|
||||
isc_app_unblock();
|
||||
show_settings(ISC_TRUE, ISC_TRUE);
|
||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||
|
|
@ -772,9 +773,10 @@ parse_args(int argc, char **argv) {
|
|||
have_lookup = ISC_TRUE;
|
||||
in_use = ISC_TRUE;
|
||||
addlookup(argv[0]);
|
||||
}
|
||||
else
|
||||
} else {
|
||||
set_nameserver(argv[0]);
|
||||
check_ra = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -850,6 +852,8 @@ main(int argc, char **argv) {
|
|||
ISC_LIST_INIT(server_list);
|
||||
ISC_LIST_INIT(search_list);
|
||||
|
||||
check_ra = ISC_TRUE;
|
||||
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue