rpms/bind/devel bind-9.3.1-no_servfail_stops.patch,NONE,1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jul 7 19:08:45 UTC 2005
Author: jvdias
Update of /cvs/dist/rpms/bind/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv7099
Added Files:
bind-9.3.1-no_servfail_stops.patch
Log Message:
fix bug 160914: make host and nslookup try next server on SERVFAIL or referral by default; give host the "-s" option, and nslookup the "[no]fail" option, to disable
bind-9.3.1-no_servfail_stops.patch:
host.1 | 6 +++++-
host.c | 11 +++++++++--
nslookup.1 | 6 ++++++
nslookup.c | 9 ++++++++-
4 files changed, 28 insertions(+), 4 deletions(-)
--- NEW FILE bind-9.3.1-no_servfail_stops.patch ---
--- bind-9.3.1/bin/dig/host.1.no_servfail_stops 2004-04-13 00:11:03.000000000 -0400
+++ bind-9.3.1/bin/dig/host.1 2005-07-07 13:55:57.000000000 -0400
@@ -20,7 +20,7 @@
host \- DNS lookup utility
.SH SYNOPSIS
.sp
-\fBhost\fR [ \fB-aCdlnrTwv\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-N \fIndots\fB\fR ] [ \fB-R \fInumber\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-W \fIwait\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] \fBname\fR [ \fBserver\fR ]
+\fBhost\fR [ \fB-aCdlnrTwv\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-N \fIndots\fB\fR ] [ \fB-R \fInumber\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-W \fIwait\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] [ \fB-s\fR ] \fBname\fR [ \fBserver\fR ]
.SH "DESCRIPTION"
.PP
\fBhost\fR
@@ -127,6 +127,10 @@
effectively wait forever for a reply. The time to wait for a response
will be set to the number of seconds given by the hardware's maximum
value for an integer quantity.
+.PP
+The \fB-s\fR option tells \fBhost\fR NOT to send the query to the next nameserver if any
+server responds with a SERVFAIL response, which is the reverse of normal stub resolver
+behaviour.
.SH "FILES"
.PP
\fI/etc/resolv.conf\fR
--- bind-9.3.1/bin/dig/nslookup.c.no_servfail_stops 2004-09-05 21:33:05.000000000 -0400
+++ bind-9.3.1/bin/dig/nslookup.c 2005-07-07 14:58:08.000000000 -0400
@@ -63,7 +63,8 @@
comments = ISC_TRUE, section_question = ISC_TRUE,
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
section_additional = ISC_TRUE, recurse = ISC_TRUE,
- aaonly = ISC_FALSE;
+ aaonly = ISC_FALSE, nofail=ISC_TRUE;
+
static isc_boolean_t in_use = ISC_FALSE;
static char defclass[MXRD] = "IN";
static char deftype[MXRD] = "A";
@@ -644,6 +645,10 @@
usesearch = ISC_FALSE;
} else if (strncasecmp(opt, "sil", 3) == 0) {
/* deprecation_msg = ISC_FALSE; */
+ } else if (strncasecmp(opt, "fail", 3) == 0) {
+ nofail=ISC_FALSE;
+ } else if (strncasecmp(opt, "nofail", 3) == 0) {
+ nofail=ISC_TRUE;
} else {
printf("*** Invalid option: %s\n", opt);
}
@@ -702,6 +707,8 @@
lookup->section_authority = section_authority;
lookup->section_additional = section_additional;
lookup->new_search = ISC_TRUE;
+ if ( nofail )
+ lookup->servfail_stops = ISC_FALSE;
ISC_LIST_INIT(lookup->q);
ISC_LINK_INIT(lookup, link);
ISC_LIST_APPEND(lookup_list, lookup, link);
--- bind-9.3.1/bin/dig/nslookup.1.no_servfail_stops 2004-08-19 22:29:39.000000000 -0400
+++ bind-9.3.1/bin/dig/nslookup.1 2005-07-07 14:53:12.000000000 -0400
@@ -178,6 +178,12 @@
Always use a virtual circuit when sending requests to the server.
(Default = novc)
+.TP
+\fB[no]fail\R
+Try the next nameserver if a nameserver responds with SERVFAIL or
+a referral (nofail) or terminate query (fail) on such a response.
+
+(Default = nofail)
.RE
.SH "FILES"
.PP
--- bind-9.3.1/bin/dig/host.c.no_servfail_stops 2004-09-05 21:33:05.000000000 -0400
+++ bind-9.3.1/bin/dig/host.c 2005-07-07 14:31:33.000000000 -0400
@@ -143,7 +143,8 @@
" -w specifies to wait forever for a reply\n"
" -W specifies how long to wait for a reply\n"
" -4 use IPv4 query transport only\n"
-" -6 use IPv6 query transport only\n", stderr);
+" -6 use IPv6 query transport only\n"
+" -s a SERVFAIL response should stop query\n", stderr);
exit(1);
}
@@ -553,7 +554,10 @@
lookup = make_empty_lookup();
- while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dni46"))
+ lookup->servfail_stops = ISC_FALSE;
+ lookup->comments = ISC_FALSE;
+
+ while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dni46s"))
!= EOF) {
switch (c) {
case 'l':
@@ -690,6 +694,9 @@
} else
fatal("can't find IPv6 networking");
break;
+ case 's':
+ lookup->servfail_stops = ISC_TRUE;
+ break;
}
}
More information about the fedora-cvs-commits
mailing list