Commit de9833be authored by Mark Andrews's avatar Mark Andrews

955. [bug] When using views, the zone's class was not being

                        inherited from the view's class.  [RT #1583]
parent 6a05eada
955. [bug] When using views, the zone's class was not being
inherited from the view's class. [RT #1583]
954. [bug] dig, host, nslookup: AXFR / IXFR are inherently
non-recursive, do not set RD. [RT #1575]
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.10 2001/08/03 18:12:04 bwelling Exp $ */
/* $Id: config.c,v 1.11 2001/08/07 01:58:54 marka Exp $ */
#include <config.h>
......@@ -177,12 +177,13 @@ ns_config_listcount(cfg_obj_t *list) {
}
isc_result_t
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t *classp) {
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp) {
char *str;
isc_textregion_t r;
if (!cfg_obj_isstring(classobj)) {
*classp = dns_rdataclass_in;
*classp = defclass;
return (ISC_R_SUCCESS);
}
str = cfg_obj_asstring(classobj);
......
......@@ -15,9 +15,9 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h,v 1.2 2001/08/03 18:12:08 bwelling Exp $ */
/* $Id: config.h,v 1.3 2001/08/07 01:58:59 marka Exp $ */
/* $Id: config.h,v 1.2 2001/08/03 18:12:08 bwelling Exp $ */
/* $Id: config.h,v 1.3 2001/08/07 01:58:59 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
......@@ -37,7 +37,8 @@ int
ns_config_listcount(cfg_obj_t *list);
isc_result_t
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t *classp);
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
dns_zonetype_t
ns_config_getzonetype(cfg_obj_t *zonetypeobj);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwresd.c,v 1.36 2001/04/02 22:52:07 bwelling Exp $ */
/* $Id: lwresd.c,v 1.37 2001/08/07 01:58:55 marka Exp $ */
/*
* Main program for the Lightweight Resolver Daemon.
......@@ -323,7 +323,7 @@ ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
if (viewobj != NULL) {
vname = cfg_obj_asstring(cfg_tuple_get(viewobj, "name"));
obj = cfg_tuple_get(viewobj, "class");
result = ns_config_getclass(obj, &vclass);
result = ns_config_getclass(obj, dns_rdataclass_in, &vclass);
if (result != ISC_R_SUCCESS)
goto fail;
} else {
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.338 2001/08/03 17:58:18 bwelling Exp $ */
/* $Id: server.c,v 1.339 2001/08/07 01:58:56 marka Exp $ */
#include <config.h>
......@@ -192,7 +192,8 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
viewclass = dns_rdataclass_in;
else {
cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
CHECK(ns_config_getclass(classobj, &viewclass));
CHECK(ns_config_getclass(classobj, dns_rdataclass_in,
&viewclass));
}
keystruct.common.rdclass = viewclass;
keystruct.common.rdtype = dns_rdatatype_key;
......@@ -1188,7 +1189,8 @@ create_view(cfg_obj_t *vconfig, dns_viewlist_t *viewlist, dns_view_t **viewp) {
viewname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
classobj = cfg_tuple_get(vconfig, "class");
result = ns_config_getclass(classobj, &viewclass);
result = ns_config_getclass(classobj, dns_rdataclass_in,
&viewclass);
} else {
viewname = "_default";
viewclass = dns_rdataclass_in;
......@@ -1249,7 +1251,8 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
&buffer, dns_rootname, ISC_FALSE, NULL));
origin = dns_fixedname_name(&fixorigin);
CHECK(ns_config_getclass(cfg_tuple_get(zconfig, "class"), &zclass));
CHECK(ns_config_getclass(cfg_tuple_get(zconfig, "class"),
view->rdclass, &zclass));
if (zclass != view->rdclass) {
const char *vname = NULL;
if (vconfig != NULL)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.86 2001/06/04 21:51:26 bwelling Exp $ */
/* $Id: zoneconf.c,v 1.87 2001/08/07 01:58:58 marka Exp $ */
#include <config.h>
......@@ -295,6 +295,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
isc_result_t result;
char *zname;
dns_rdataclass_t zclass;
dns_rdataclass_t vclass;
cfg_obj_t *maps[5];
cfg_obj_t *zoptions = NULL;
cfg_obj_t *options = NULL;
......@@ -327,13 +328,21 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
}
maps[i++] = ns_g_defaults;
maps[i++] = NULL;
if (vconfig != NULL)
RETERR(ns_config_getclass(cfg_tuple_get(vconfig, "class"),
dns_rdataclass_in, &vclass));
else
vclass = dns_rdataclass_in;
/*
* Configure values common to all zone types.
*/
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
RETERR(ns_config_getclass(cfg_tuple_get(zconfig, "class"), &zclass));
RETERR(ns_config_getclass(cfg_tuple_get(zconfig, "class"),
vclass, &zclass));
dns_zone_setclass(zone, zclass);
ztype = zonetype_fromconfig(zoptions);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment