mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
625. [func] Zone's now inherit their class from the enclosing view.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -1,3 +1,4 @@
|
||||
625. [func] Zone's now inherit their class from the enclosing view.
|
||||
|
||||
624. [bug] The zone object could get timer events after it had
|
||||
been destroyed, causing a server crash. [RT #571]
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
|
||||
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.71 2000/12/19 19:48:06 gson Exp $ -->
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.72 2000/12/20 03:36:18 marka Exp $ -->
|
||||
|
||||
<book>
|
||||
|
||||
@@ -3805,9 +3805,12 @@ Classes other than IN have no built-in defaults hints.</para></entry>
|
||||
</tbody>
|
||||
</tgroup></informaltable></sect3>
|
||||
<sect3><title>Class</title>
|
||||
<para>The zone's name may optionally be followed by a class. If
|
||||
a class is not specified, class <literal>IN</literal> (for <varname>Internet</varname>),
|
||||
is assumed. This is correct for the vast majority of cases.</para>
|
||||
<para>In general <command>class</command> can now be omitted from
|
||||
a <command>zone's</command> definition.
|
||||
It is now inherited for the enclosing <command>view</command> or if
|
||||
there is no explicit <command>view</command>, from the default
|
||||
<command>view</command> which is <literal>IN</literal>
|
||||
(for <varname>Internet</varname>).</para>
|
||||
<para>The <literal>hesiod</literal> class is
|
||||
named for an information service from MIT's Project Athena. It is
|
||||
used to share information about various systems databases, such
|
||||
|
@@ -33,7 +33,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: confparser.y.dirty,v 1.43 2000/12/13 00:15:23 tale Exp $ */
|
||||
/* $Id: confparser.y.dirty,v 1.44 2000/12/20 03:36:19 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -3644,6 +3644,7 @@ secret: L_SECRET any_string L_EOS
|
||||
view_stmt: L_VIEW any_string optional_class L_LBRACE
|
||||
{
|
||||
dns_c_view_t *view;
|
||||
dns_rdataclass_t rdclass;
|
||||
|
||||
if (currcfg->views == NULL) {
|
||||
tmpres = dns_c_viewtable_new(currcfg->mem,
|
||||
@@ -3655,8 +3656,10 @@ view_stmt: L_VIEW any_string optional_class L_LBRACE
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
rdclass = ($3 == dns_rdataclass_reserved0) ?
|
||||
dns_rdataclass_in : $3;
|
||||
|
||||
tmpres = dns_c_view_new(currcfg->mem, $2, $3, &view);
|
||||
tmpres = dns_c_view_new(currcfg->mem, $2, rdclass, &view);
|
||||
if (tmpres != ISC_R_SUCCESS) {
|
||||
isc_mem_free(memctx, $2);
|
||||
parser_error(ISC_FALSE,
|
||||
@@ -4831,6 +4834,8 @@ domain_name: L_QSTRING
|
||||
zone_stmt: L_ZONE domain_name optional_class L_LBRACE L_TYPE zone_type L_EOS
|
||||
{
|
||||
dns_c_zone_t *zone;
|
||||
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
|
||||
dns_rdataclass_t rdclass;
|
||||
|
||||
if (currcfg->zlist == NULL) {
|
||||
tmpres = dns_c_zonelist_new(currcfg->mem,
|
||||
@@ -4844,10 +4849,17 @@ zone_stmt: L_ZONE domain_name optional_class L_LBRACE L_TYPE zone_type L_EOS
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
rdclass = $3;
|
||||
if (rdclass == dns_rdataclass_reserved0) {
|
||||
if (view != NULL)
|
||||
(void)dns_c_view_getviewclass(view, &rdclass);
|
||||
else
|
||||
rdclass = dns_rdataclass_in;
|
||||
}
|
||||
|
||||
/* XXX internal name support needed! */
|
||||
tmpres = dns_c_zone_new(currcfg->mem,
|
||||
$6, $3, $2, $2, &zone);
|
||||
$6, rdclass, $2, $2, &zone);
|
||||
if (tmpres != ISC_R_SUCCESS) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
DNS_LOGMODULE_CONFIG,
|
||||
@@ -4971,7 +4983,7 @@ wild_class_name: any_string
|
||||
|
||||
optional_class: /* Empty */
|
||||
{
|
||||
$$ = dns_rdataclass_in;
|
||||
$$ = dns_rdataclass_reserved0;
|
||||
}
|
||||
| class_name
|
||||
;
|
||||
@@ -6021,8 +6033,12 @@ lwres_option: L_LISTEN_ON port_ip_list
|
||||
| L_VIEW any_string optional_class
|
||||
{
|
||||
dns_c_lwres_t *lwres;
|
||||
dns_rdataclass_t rdclass;
|
||||
|
||||
lwres = ISC_LIST_TAIL(currcfg->lwres->lwreslist);
|
||||
tmpres = dns_c_lwres_setview(lwres, $2, $3);
|
||||
rdclass = ($3 == dns_rdataclass_reserved0) ?
|
||||
dns_rdataclass_in : $3;
|
||||
tmpres = dns_c_lwres_setview(lwres, $2, rdclass);
|
||||
if (tmpres == ISC_R_EXISTS) {
|
||||
parser_error(ISC_FALSE, "cannot redefine view");
|
||||
YYABORT;
|
||||
|
Reference in New Issue
Block a user