Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc4f4d32ce4b1a90e7e68ed631842990 > files > 55

bind-9.3.6-25.P1.el5_11.9.src.rpm

diff -up bind-9.3.6-P1/bin/named_sdb/query.c.rh533229-2 bind-9.3.6-P1/bin/named_sdb/query.c
--- bind-9.3.6-P1/bin/named_sdb/query.c.rh533229-2	2010-11-04 17:11:13.908326740 +0100
+++ bind-9.3.6-P1/bin/named_sdb/query.c	2010-11-04 17:13:59.057973562 +0100
@@ -560,9 +560,16 @@ query_getzonedb(ns_client_t *client, dns
 			     &zone);
 	if (result == DNS_R_PARTIALMATCH)
 		partial = ISC_TRUE;
+retry:
 	if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
 		result = dns_zone_getdb(zone, &db);
 
+	/* Try to reconnect to database if zone is stored via SDB */
+	if (result == DNS_R_NOTLOADED && dns_zone_getfile(zone) == NULL) {
+		result = dns_zone_load(zone);
+		goto retry;
+	}
+
 	if (result != ISC_R_SUCCESS)
 		goto fail;