From 37d1c8ee546ae89720c3e17e57ee3a05e9cdc7b9 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 18 Oct 2000 22:13:48 +0000 Subject: [PATCH] 524. [func] The 'forward' and 'forwarders' statement in non-forward zones should work now. --- CHANGES | 3 +++ bin/named/server.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d0f98269e2..f3e4755916 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ + 524. [func] The 'forward' and 'forwarders' statement in + non-forward zones should work now. + 523. [doc] The source to the Administrator Reference Manual is now an XML file using the DocBook DTD, and is included in the distribution. The plain text version of the diff --git a/bin/named/server.c b/bin/named/server.c index 307cdc1158..6a37f7b315 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.230 2000/10/17 07:22:23 marka Exp $ */ +/* $Id: server.c,v 1.231 2000/10/18 22:13:48 bwelling Exp $ */ #include @@ -1028,6 +1028,8 @@ configure_zone(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview, dns_view_t *pview = NULL; /* Production view */ dns_zone_t *zone = NULL; /* New or reused zone */ dns_zone_t *dupzone = NULL; + dns_c_iplist_t *forwarders = NULL; + dns_c_forw_t tfwd; isc_result_t result; @@ -1166,6 +1168,15 @@ configure_zone(dns_c_ctx_t *cctx, dns_c_zone_t *czone, dns_c_view_t *cview, CHECK(dns_zonemgr_managezone(ns_g_server->zonemgr, zone)); } + /* + * If the zone contains 'forward' or 'forwarders' statements, + * configure selective forwarding. + */ + if (dns_c_zone_getforwarders(czone, &forwarders) == ISC_R_SUCCESS || + dns_c_zone_getforward(czone, &tfwd) == ISC_R_SUCCESS) + CHECK(configure_forward(cctx, czone, cview, view, + origin, forwarders)); + /* * Configure the zone. */