mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00: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:
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.206 2005/08/25 00:17:45 marka Exp $ */
|
||||
/* $Id: dig.c,v 1.207 2005/08/25 00:40:49 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.281 2005/08/25 00:17:46 marka Exp $ */
|
||||
/* $Id: dighost.c,v 1.282 2005/08/25 00:40:49 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,
|
||||
@@ -2796,8 +2797,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;
|
||||
@@ -2810,7 +2811,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;
|
||||
@@ -2828,9 +2831,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.105 2005/08/25 00:31:31 marka Exp $ */
|
||||
/* $Id: host.c,v 1.106 2005/08/25 00:40:49 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.95 2005/08/25 00:17:46 marka Exp $ */
|
||||
/* $Id: dig.h,v 1.96 2005/08/25 00:40:50 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.110 2005/08/25 00:31:32 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.111 2005/08/25 00:40:50 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");
|
||||
|
||||
|
Reference in New Issue
Block a user