- cleanup in caching-nameserver config file
- zone-freeze patch has been improved
This commit is contained in:
parent
205d5ef896
commit
03f646e50f
@ -1,46 +1,50 @@
|
|||||||
--- 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.freeze 2007-04-24 12:35:03.000000000 +0200
|
||||||
+++ bind-9.4.0/lib/dns/view.c 2007-04-18 12:50:30.000000000 +0200
|
+++ bind-9.4.0/lib/dns/view.c 2007-04-24 12:52:02.000000000 +0200
|
||||||
@@ -1140,6 +1140,28 @@
|
@@ -1140,6 +1140,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
+dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
|
+dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, isc_boolean_t allclasses,
|
||||||
+ dns_rdataclass_t rdclass, dns_zone_t **zonep)
|
+ dns_rdataclass_t rdclass, dns_zone_t **zonep)
|
||||||
+{
|
+{
|
||||||
+ dns_view_t *view;
|
+ dns_view_t *view;
|
||||||
+ isc_result_t result;
|
+ isc_result_t result;
|
||||||
|
+ isc_boolean_t match = isc_boolean_false;
|
||||||
+
|
+
|
||||||
+ REQUIRE(list != NULL);
|
+ REQUIRE(list != NULL);
|
||||||
+
|
+
|
||||||
+ for (view = ISC_LIST_HEAD(*list);
|
+ for (view = ISC_LIST_HEAD(*list);
|
||||||
+ view != NULL;
|
+ view != NULL;
|
||||||
+ view = ISC_LIST_NEXT(view, link)) {
|
+ view = ISC_LIST_NEXT(view, link)) {
|
||||||
+ if (view->rdclass != rdclass)
|
+ if (allclasses == isc_boolean_false && view->rdclass != rdclass )
|
||||||
+ continue;
|
+ continue;
|
||||||
+ result = dns_zt_find(view->zonetable, name,
|
+ result = dns_zt_find(view->zonetable, name,
|
||||||
+ 0, NULL, zonep);
|
+ 0, NULL, zonep);
|
||||||
+ if (result == ISC_R_SUCCESS)
|
+ if(result == ISC_R_SUCCESS) {
|
||||||
+ return ISC_R_SUCCESS;
|
+ if (match != isc_boolean_false)
|
||||||
|
+ return ISC_R_NOTFOUND;
|
||||||
|
+ match = isc_boolean_true;
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ return ISC_R_NOTFOUND;
|
+ return (match == isc_boolean_false) ? ISC_R_NOTFOUND : ISC_R_SUCCESS;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+isc_result_t
|
+isc_result_t
|
||||||
dns_view_load(dns_view_t *view, isc_boolean_t stop) {
|
dns_view_load(dns_view_t *view, isc_boolean_t stop) {
|
||||||
|
|
||||||
REQUIRE(DNS_VIEW_VALID(view));
|
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.freeze 2007-04-24 12:35:03.000000000 +0200
|
||||||
+++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-18 12:49:47.000000000 +0200
|
+++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-24 12:35:03.000000000 +0200
|
||||||
@@ -592,6 +592,19 @@
|
@@ -592,6 +592,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
+dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
|
+dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, isc_boolean_t allclasses,
|
||||||
+ dns_rdataclass_t rdclass, dns_zone_t **zonep);
|
+ dns_rdataclass_t rdclass, dns_zone_t **zonep);
|
||||||
+
|
+
|
||||||
+/*%<
|
+/*%<
|
||||||
+ * Search zone with 'name' in view with 'rdclass' in viewlist 'list'
|
+ * Search zone with 'name' in view with 'rdclass' in viewlist 'list'
|
||||||
+ * If found, zone is returned in *zonep
|
+ * If found, zone is returned in *zonep. If allclasses is set rdclass is ignored
|
||||||
+ *
|
+ *
|
||||||
+ * Returns:
|
+ * Returns:
|
||||||
+ *\li #ISC_R_SUCCESS A matching zone was found.
|
+ *\li #ISC_R_SUCCESS A matching zone was found.
|
||||||
@ -51,9 +55,9 @@
|
|||||||
dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
|
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'.
|
* 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.freeze 2007-04-24 12:35:03.000000000 +0200
|
||||||
+++ bind-9.4.0/bin/named/server.c 2007-04-18 12:48:02.000000000 +0200
|
+++ bind-9.4.0/bin/named/server.c 2007-04-24 12:35:03.000000000 +0200
|
||||||
@@ -3922,19 +3922,23 @@
|
@@ -3922,19 +3922,24 @@
|
||||||
rdclass = dns_rdataclass_in;
|
rdclass = dns_rdataclass_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,6 +69,7 @@
|
|||||||
- goto fail1;
|
- goto fail1;
|
||||||
+ if (viewtxt == NULL) {
|
+ if (viewtxt == NULL) {
|
||||||
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
|
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
|
||||||
|
+ (classtxt == NULL) ? isc_boolean_true : isc_boolean_false,
|
||||||
+ rdclass, zonep);
|
+ rdclass, zonep);
|
||||||
+ }
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
@ -86,9 +91,9 @@
|
|||||||
fail1:
|
fail1:
|
||||||
return (result);
|
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.freeze 2007-04-24 12:35:03.000000000 +0200
|
||||||
+++ bind-9.4.0/bin/named_sdb/server.c 2007-04-18 12:54:29.000000000 +0200
|
+++ bind-9.4.0/bin/named_sdb/server.c 2007-04-24 12:35:03.000000000 +0200
|
||||||
@@ -3917,15 +3917,20 @@
|
@@ -3917,19 +3917,24 @@
|
||||||
rdclass = dns_rdataclass_in;
|
rdclass = dns_rdataclass_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +108,7 @@
|
|||||||
- 0, NULL, zonep);
|
- 0, NULL, zonep);
|
||||||
+ if (viewtxt == NULL) {
|
+ if (viewtxt == NULL) {
|
||||||
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
|
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
|
||||||
|
+ (classtxt == NULL) ? isc_boolean_true : isc_boolean_false,
|
||||||
+ rdclass, zonep);
|
+ rdclass, zonep);
|
||||||
+ }
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
@ -118,3 +124,7 @@
|
|||||||
/* Partial match? */
|
/* Partial match? */
|
||||||
if (result != ISC_R_SUCCESS && *zonep != NULL)
|
if (result != ISC_R_SUCCESS && *zonep != NULL)
|
||||||
dns_zone_detach(zonep);
|
dns_zone_detach(zonep);
|
||||||
|
- dns_view_detach(&view);
|
||||||
|
fail1:
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
@ -17,7 +17,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
|||||||
Name: bind
|
Name: bind
|
||||||
License: BSD-like
|
License: BSD-like
|
||||||
Version: 9.4.0
|
Version: 9.4.0
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Epoch: 31
|
Epoch: 31
|
||||||
Url: http://www.isc.org/products/BIND/
|
Url: http://www.isc.org/products/BIND/
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@ -82,6 +82,7 @@ Patch64: bind-9.4.0-idnkit-autotools.patch
|
|||||||
Patch65: bind-9.4.0-dig-idn.patch
|
Patch65: bind-9.4.0-dig-idn.patch
|
||||||
%endif
|
%endif
|
||||||
Patch66: bind-9.4.0-zone-freeze.patch
|
Patch66: bind-9.4.0-zone-freeze.patch
|
||||||
|
#Patch67: bind-9.4.0-dbus-race-condition.patch
|
||||||
#
|
#
|
||||||
Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp
|
Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp
|
||||||
Requires(post): grep, chkconfig >= 1.3.26
|
Requires(post): grep, chkconfig >= 1.3.26
|
||||||
@ -287,6 +288,7 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools
|
|||||||
#
|
#
|
||||||
# this must follow all dbus patches:
|
# this must follow all dbus patches:
|
||||||
#
|
#
|
||||||
|
#%patch67 -p1 -b .race-condition
|
||||||
cp -fp contrib/dbus/{dbus_mgr.c,dbus_service.c} bin/named
|
cp -fp contrib/dbus/{dbus_mgr.c,dbus_service.c} bin/named
|
||||||
cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named
|
cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named
|
||||||
%if %{SDB}
|
%if %{SDB}
|
||||||
@ -806,6 +808,11 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 24 2007 Adam Tkac <atkac redhat com> 31:9.4.0-8.fc7
|
||||||
|
- improved "zone freeze patch" - if multiple zone with same name exists
|
||||||
|
no zone is freezed
|
||||||
|
- minor cleanup in caching-nameserver's config file
|
||||||
|
|
||||||
* Tue Apr 17 2007 Adam Tkac <atkac redhat com> 31:9.4.0-7.fc7
|
* Tue Apr 17 2007 Adam Tkac <atkac redhat com> 31:9.4.0-7.fc7
|
||||||
- removed DEBUGINFO option because with this option (default) was bind
|
- removed DEBUGINFO option because with this option (default) was bind
|
||||||
builded with -O0 and without this flag no debuginfo package was produced.
|
builded with -O0 and without this flag no debuginfo package was produced.
|
||||||
|
@ -19,6 +19,7 @@ options {
|
|||||||
statistics-file "/var/named/data/named_stats.txt";
|
statistics-file "/var/named/data/named_stats.txt";
|
||||||
memstatistics-file "/var/named/data/named_mem_stats.txt";
|
memstatistics-file "/var/named/data/named_mem_stats.txt";
|
||||||
allow-query { localhost; };
|
allow-query { localhost; };
|
||||||
|
recursion yes;
|
||||||
};
|
};
|
||||||
logging {
|
logging {
|
||||||
channel default_debug {
|
channel default_debug {
|
||||||
@ -26,9 +27,4 @@ logging {
|
|||||||
severity dynamic;
|
severity dynamic;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
view localhost_resolver {
|
include "/etc/named.rfc1912.zones";
|
||||||
match-clients { localhost; };
|
|
||||||
match-destinations { localhost; };
|
|
||||||
recursion yes;
|
|
||||||
include "/etc/named.rfc1912.zones";
|
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user