[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/bind/FC-4 bind-9.3.1-next_server_on_referral.patch,NONE,1.1



Author: jvdias

Update of /cvs/dist/rpms/bind/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv1382

Added Files:
	bind-9.3.1-next_server_on_referral.patch 
Log Message:
fix bug 160914: treat empty "referral" server responses as for SERVFAIL: try next server if lookup->servfail_stops is FALSE

bind-9.3.1-next_server_on_referral.patch:
 dighost.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

--- NEW FILE bind-9.3.1-next_server_on_referral.patch ---
--- bind-9.3.1/bin/dig/dighost.c.next_server_on_referral	2005-07-07 13:19:29.000000000 -0400
+++ bind-9.3.1/bin/dig/dighost.c	2005-07-07 14:30:38.000000000 -0400
@@ -2765,7 +2765,15 @@
 		UNLOCK_LOOKUP;
 		return;
 	}			
-	if (msg->rcode == dns_rcode_servfail && !l->servfail_stops) {
+	if ( (!l->servfail_stops)
+	   &&( (msg->rcode == dns_rcode_servfail)
+	     ||(  (msg->rcode == dns_rcode_noerror) 
+	        &&(msg->counts[DNS_SECTION_ANSWER] == 0)
+		&&((msg->flags & (DNS_MESSAGEFLAG_AA | DNS_MESSAGEFLAG_RA)) == 0)
+	       )
+	     )
+	   )
+	{
 		dig_query_t *next = ISC_LIST_NEXT(query, link);
 		if (l->current_query == query)
 			l->current_query = NULL;
@@ -2783,9 +2791,11 @@
 		 */
 		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 reply from %s, "
+				       "trying next server\n",
+				       msg->rcode == dns_rcode_servfail ? "SERVFAIL" : "referral",
+				       query->servname);
 			clear_query(query);
 			check_next_lookup(l);
 			dns_message_destroy(&msg);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]