nslookup failed to resolve name in certain cases

Signed-off-by: Adam Tkac <vonsch@gmail.com>
This commit is contained in:
Adam Tkac 2011-10-28 15:05:56 +02:00
parent 2d24bcf904
commit 61b073aa6a
2 changed files with 36 additions and 1 deletions

View File

@ -22,7 +22,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.8.1
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -69,6 +69,7 @@ Patch120:bind97-rh700097.patch
Patch121:bind97-rh714049.patch
Patch122:bind98-dlz_buildfix.patch
Patch123:bind98-rh735103.patch
Patch124:nslookup-norec.patch
# SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch
@ -291,6 +292,9 @@ mkdir m4
%patch121 -p1 -b .rh714049
%patch122 -p1 -b .dlz_buildfix
%patch123 -p1 -b .rh735103
pushd bin/dig
%patch124 -p0 -b .nslookup-norec
popd
# Sparc and s390 arches need to use -fPIE
%ifarch sparcv9 sparc64 s390 s390x
@ -761,6 +765,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
* Fri Oct 28 2011 Adam Tkac <atkac redhat com> 32:9.8.1-4
- nslookup failed to resolve name in certain cases
* Mon Sep 26 2011 Adam Tkac <atkac redhat com> 32:9.8.1-3
- remove deps filter, it is no longer needed (#739663)

28
nslookup-norec.patch Normal file
View File

@ -0,0 +1,28 @@
--- dighost.c.orig 2011-03-11 07:46:58.000000000 +0100
+++ dighost.c 2011-10-28 14:31:29.806591603 +0200
@@ -2619,8 +2619,13 @@ connect_timeout(isc_task_t *task, isc_ev
}
} else {
fputs(l->cmdline, stdout);
- printf(";; connection timed out; no servers could be "
- "reached\n");
+ if (!next_origin(NULL, query)) {
+ printf(";; connection timed out; no servers could be "
+ "reached\n");
+ } else {
+ printf(";; connection timed out; trying next "
+ "origin\n");
+ }
cancel_lookup(l);
check_next_lookup(l);
if (exitcode < 9)
@@ -3270,7 +3275,8 @@ recv_done(isc_task_t *task, isc_event_t
return;
}
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
- (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
+ (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 &&
+ msg->rcode != dns_rcode_noerror && l->recurse))
{
dig_query_t *next = ISC_LIST_NEXT(query, link);
if (l->current_query == query)