summaryrefslogtreecommitdiffstats
path: root/bind-9.4.0-zone-freeze.patch
diff options
context:
space:
mode:
authorAdam Tkac <atkac@fedoraproject.org>2007-04-18 11:25:21 +0000
committerAdam Tkac <atkac@fedoraproject.org>2007-04-18 11:25:21 +0000
commit205d5ef896f7cb087c96cec1935440c70602d58f (patch)
treedafd4faea630af57bdcb3bab34dc26675dbd50d7 /bind-9.4.0-zone-freeze.patch
parent0c76cb393423432903172be2102085bf4819d773 (diff)
downloadbind-205d5ef896f7cb087c96cec1935440c70602d58f.tar.gz
bind-205d5ef896f7cb087c96cec1935440c70602d58f.tar.xz
bind-205d5ef896f7cb087c96cec1935440c70602d58f.zip
- renamed idn patchesbind-9_4_0-7_fc7
- named could find zone to freeze correctly now (#236426)
Diffstat (limited to 'bind-9.4.0-zone-freeze.patch')
-rw-r--r--bind-9.4.0-zone-freeze.patch120
1 files changed, 120 insertions, 0 deletions
diff --git a/bind-9.4.0-zone-freeze.patch b/bind-9.4.0-zone-freeze.patch
new file mode 100644
index 0000000..dc5fb6a
--- /dev/null
+++ b/bind-9.4.0-zone-freeze.patch
@@ -0,0 +1,120 @@
+--- bind-9.4.0/lib/dns/view.c.freeze 2007-04-18 11:51:02.000000000 +0200
++++ bind-9.4.0/lib/dns/view.c 2007-04-18 12:50:30.000000000 +0200
+@@ -1140,6 +1140,28 @@
+ }
+
+ isc_result_t
++dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
++ dns_rdataclass_t rdclass, dns_zone_t **zonep)
++{
++ dns_view_t *view;
++ isc_result_t result;
++
++ REQUIRE(list != NULL);
++
++ for (view = ISC_LIST_HEAD(*list);
++ view != NULL;
++ view = ISC_LIST_NEXT(view, link)) {
++ if (view->rdclass != rdclass)
++ continue;
++ result = dns_zt_find(view->zonetable, name,
++ 0, NULL, zonep);
++ if (result == ISC_R_SUCCESS)
++ return ISC_R_SUCCESS;
++ }
++ return ISC_R_NOTFOUND;
++}
++
++isc_result_t
+ dns_view_load(dns_view_t *view, isc_boolean_t stop) {
+
+ REQUIRE(DNS_VIEW_VALID(view));
+--- bind-9.4.0/lib/dns/include/dns/view.h.freeze 2007-04-18 12:03:13.000000000 +0200
++++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-18 12:49:47.000000000 +0200
+@@ -592,6 +592,19 @@
+ */
+
+ isc_result_t
++dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
++ dns_rdataclass_t rdclass, dns_zone_t **zonep);
++
++/*%<
++ * Search zone with 'name' in view with 'rdclass' in viewlist 'list'
++ * If found, zone is returned in *zonep
++ *
++ * Returns:
++ *\li #ISC_R_SUCCESS A matching zone was found.
++ *\li #ISC_R_NOTFOUND No matching zone was found.
++ */
++
++isc_result_t
+ dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
+ /*%<
+ * Search for the zone 'name' in the zone table of 'view'.
+--- bind-9.4.0/bin/named/server.c.freeze 2007-04-18 12:44:26.000000000 +0200
++++ bind-9.4.0/bin/named/server.c 2007-04-18 12:48:02.000000000 +0200
+@@ -3922,19 +3922,23 @@
+ rdclass = dns_rdataclass_in;
+ }
+
+- if (viewtxt == NULL)
+- viewtxt = "_default";
+- result = dns_viewlist_find(&server->viewlist, viewtxt,
+- rdclass, &view);
+- if (result != ISC_R_SUCCESS)
+- goto fail1;
++ if (viewtxt == NULL) {
++ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
++ rdclass, zonep);
++ }
++ else {
++ result = dns_viewlist_find(&server->viewlist, viewtxt,
++ rdclass, &view);
++ if (result != ISC_R_SUCCESS)
++ goto fail1;
+
+- result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
+- 0, NULL, zonep);
++ result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
++ 0, NULL, zonep);
++ dns_view_detach(&view);
++ }
+ /* Partial match? */
+ if (result != ISC_R_SUCCESS && *zonep != NULL)
+ dns_zone_detach(zonep);
+- dns_view_detach(&view);
+ fail1:
+ return (result);
+ }
+--- bind-9.4.0/bin/named_sdb/server.c.freeze 2007-04-18 12:52:58.000000000 +0200
++++ bind-9.4.0/bin/named_sdb/server.c 2007-04-18 12:54:29.000000000 +0200
+@@ -3917,15 +3917,20 @@
+ rdclass = dns_rdataclass_in;
+ }
+
+- if (viewtxt == NULL)
+- viewtxt = "_default";
+- result = dns_viewlist_find(&server->viewlist, viewtxt,
+- rdclass, &view);
+- if (result != ISC_R_SUCCESS)
+- goto fail1;
+-
+- result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
+- 0, NULL, zonep);
++ if (viewtxt == NULL) {
++ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
++ rdclass, zonep);
++ }
++ else {
++ result = dns_viewlist_find(&server->viewlist, viewtxt,
++ rdclass, &view);
++ if (result != ISC_R_SUCCESS)
++ goto fail1;
++
++ result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
++ 0, NULL, zonep);
++ dns_view_detach(&view);
++ }
+ /* Partial match? */
+ if (result != ISC_R_SUCCESS && *zonep != NULL)
+ dns_zone_detach(zonep);