2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Replace +aa option, per AG.

This commit is contained in:
Michael Sawyer
2000-07-13 21:12:21 +00:00
parent 8f56f93547
commit a31dbaa03f
2 changed files with 14 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: dig.c,v 1.64 2000/07/13 21:00:58 mws Exp $ */
/* $Id: dig.c,v 1.65 2000/07/13 21:12:20 mws Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -158,6 +158,7 @@ show_usage(void) {
" +[no]search (Set whether to use searchlist)\n"
" +[no]defname (Set whether to use default domain)\n"
" +[no]recursive (Recursive mode)\n"
" +[no]aaonly (Set AA flag in query)\n"
" +[no]adflag (Set AD flag in query)\n"
" +[no]cdflag (Set CD flag in query)\n"
" +[no]details (Show details of all requests)\n"
@@ -664,6 +665,10 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
lookup->recurse = ISC_TRUE;
} else if (strncmp(rv[0], "+norec", 6) == 0) {
lookup->recurse = ISC_FALSE;
} else if (strncmp(rv[0], "+aa", 3) == 0) {
lookup->aaonly = ISC_TRUE;
} else if (strncmp(rv[0], "+noaa", 5) == 0) {
lookup->aaonly = ISC_FALSE;
} else if (strncmp(rv[0], "+adf", 4) == 0) {
lookup->adflag = ISC_TRUE;
} else if (strncmp(rv[0], "+noadf", 6) == 0) {

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: dighost.c,v 1.83 2000/07/13 21:00:59 mws Exp $ */
/* $Id: dighost.c,v 1.84 2000/07/13 21:12:21 mws Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
@@ -260,6 +260,7 @@ make_empty_lookup(void) {
looknew->identify = ISC_FALSE;
looknew->udpsize = 0;
looknew->recurse = ISC_TRUE;
looknew->aaonly = ISC_FALSE;
looknew->adflag = ISC_FALSE;
looknew->cdflag = ISC_FALSE;
looknew->ns_search_only = ISC_FALSE;
@@ -303,6 +304,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
looknew->identify = lookold->identify;
looknew->udpsize = lookold->udpsize;
looknew->recurse = lookold->recurse;
looknew->aaonly = lookold->aaonly;
looknew->adflag = lookold->adflag;
looknew->cdflag = lookold->cdflag;
looknew->ns_search_only = lookold->ns_search_only;
@@ -1140,6 +1142,11 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_RD;
}
if (lookup->aaonly) {
debug("AA query");
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_AA;
}
if (lookup->adflag) {
debug("AD query");
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_AD;