Remove notify forwarding.

This commit is contained in:
Brian Wellington
2001-02-24 00:59:00 +00:00
parent cd3ea9f0cf
commit 6fd0827482
7 changed files with 8 additions and 287 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.81 2001/02/24 00:35:12 bwelling Exp $ */
/* $Id: zoneconf.c,v 1.82 2001/02/24 00:58:52 bwelling Exp $ */
#include <config.h>
@@ -258,21 +258,6 @@ ns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
statistics = ISC_FALSE;
dns_zone_setstatistics(zone, statistics);
#ifndef NOMINUM_PUBLIC
if (czone->ztype == dns_c_zone_slave) {
isc_boolean_t boolean;
result = dns_c_zone_getnotifyforward(czone, &boolean);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_getnotifyforward(cview, &boolean);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_getnotifyforward(cctx, &boolean);
if (result != ISC_R_SUCCESS)
boolean = ISC_FALSE;
dns_zone_setoption(zone, DNS_ZONEOPT_NOTIFYFORWARD, boolean);
}
#endif /* NOMINUM_PUBLIC */
/*
* Configure master functionality. This applies
* to primary masters (type "master") and slaves

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: confctx.c,v 1.119 2001/02/22 17:30:09 gson Exp $ */
/* $Id: confctx.c,v 1.120 2001/02/24 00:58:55 bwelling Exp $ */
#include <config.h>
@@ -1045,9 +1045,6 @@ dns_c_ctx_optionsprint(FILE *fp, int indent, dns_c_options_t *options)
PRINT_AS_BOOLEAN(treat_cr_as_space, "treat-cr-as-space");
PRINT_AS_BOOLEAN(additional_from_auth, "additional-from-auth");
PRINT_AS_BOOLEAN(additional_from_cache, "additional-from-cache");
#ifndef NOMINUM_PUBLIC
PRINT_AS_BOOLEAN(notify_forward, "notify-forward");
#endif /* NOMINUM_PUBLIC */
if (options->transfer_format != NULL) {
dns_c_printtabs(fp, indent + 1);
@@ -1570,9 +1567,6 @@ dns_c_ctx_optionsnew(isc_mem_t *mem, dns_c_options_t **options)
opts->treat_cr_as_space = NULL;
opts->additional_from_auth = NULL;
opts->additional_from_cache = NULL;
#ifndef NOMINUM_PUBLIC
opts->notify_forward = NULL;
#endif /* NOMINUM_PUBLIC */
opts->notify_source = NULL;
opts->notify_source_v6 = NULL;
@@ -1723,10 +1717,6 @@ dns_c_ctx_optionsdelete(dns_c_options_t **opts)
FREEFIELD(min_refresh_time);
FREEFIELD(max_refresh_time);
#ifndef NOMINUM_PUBLIC
FREEFIELD(notify_forward);
#endif /* NOMINUM_PUBLIC */
FREEFIELD(notify_source);
FREEFIELD(notify_source_v6);
FREEFIELD(transfer_source);
@@ -1850,10 +1840,6 @@ BOOL_FUNCS(fetchglue, fetch_glue)
NOTIFYTYPE_FUNCS(notify, notify)
#ifndef NOMINUM_PUBLIC
BOOL_FUNCS(notifyforward, notify_forward)
#endif /* NOMINUM_PUBLIC */
BOOL_FUNCS(hoststatistics, host_statistics)
BOOL_FUNCS(dealloconexit, dealloc_on_exit)
BOOL_FUNCS(useixfr, use_ixfr)

View File

@@ -33,7 +33,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: confparser.y.dirty,v 1.54 2001/01/30 22:02:26 gson Exp $ */
/* $Id: confparser.y.dirty,v 1.55 2001/02/24 00:58:56 bwelling Exp $ */
#include <config.h>
@@ -364,9 +364,6 @@ static isc_boolean_t int_too_big(isc_uint32_t base, isc_uint32_t mult);
%token L_NOTIFY
%token L_NOTIFY_SOURCE
%token L_NOTIFY_SOURCE_V6
#ifndef NOMINUM_PUBLIC
%token L_NOTIFY_FORWARD
#endif /* NOMINUM_PUBLIC */
%token L_NOTIFY_PASSIVE
%token L_NULL_OUTPUT
%token L_ONE_ANSWER
@@ -821,17 +818,6 @@ option: /* Empty */
YYABORT;
}
}
#ifndef NOMINUM_PUBLIC
| L_NOTIFY_FORWARD yea_or_nay
{
tmpres = dns_c_ctx_setnotifyforward(currcfg, $2);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine notify-forward");
YYABORT;
}
}
#endif /* NOMINUM_PUBLIC */
| L_RECURSION yea_or_nay
{
tmpres = dns_c_ctx_setrecursion(currcfg, $2);
@@ -3871,25 +3857,6 @@ view_option: L_FORWARD zone_forward_opt
YYABORT;
}
}
#ifndef NOMINUM_PUBLIC
| L_NOTIFY_FORWARD yea_or_nay
{
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
INSIST(view != NULL);
tmpres = dns_c_view_setnotifyforward(view, $2);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine view notify-forward");
YYABORT;
} else if (tmpres != ISC_R_SUCCESS) {
parser_error(ISC_FALSE,
"failed to set view notify-forward");
YYABORT;
}
}
#endif /* NOMINUM_PUBLIC */
| L_RECURSION yea_or_nay
{
dns_c_view_t *view = dns_c_ctx_getcurrview(currcfg);
@@ -4972,10 +4939,7 @@ zone_non_type_keywords: L_FILE | L_FILE_IXFR | L_IXFR_TMP | L_MASTERS |
L_MAINTAIN_IXFR_BASE | L_PUBKEY | L_ALSO_NOTIFY | L_DIALUP |
L_ENABLE_ZONE | L_DATABASE | L_PORT | L_MIN_RETRY_TIME |
L_MAX_RETRY_TIME | L_MIN_REFRESH_TIME | L_MAX_REFRESH_TIME |
L_ZONE_STATISTICS | L_NOTIFY_SOURCE | L_NOTIFY_SOURCE_V6 |
#ifndef NOMINUM_PUBLIC
| L_NOTIFY_FORWARD
#endif /* NOMINUM_PUBLIC */
L_ZONE_STATISTICS | L_NOTIFY_SOURCE | L_NOTIFY_SOURCE_V6
;
@@ -5588,25 +5552,6 @@ zone_option: L_FILE L_QSTRING
YYABORT;
}
}
#ifndef NOMINUM_PUBLIC
| L_NOTIFY_FORWARD yea_or_nay
{
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
INSIST(zone != NULL);
tmpres = dns_c_zone_setnotifyforward(zone, $2);
if (tmpres == ISC_R_EXISTS) {
parser_error(ISC_FALSE,
"cannot redefine zone notify-forward");
YYABORT;
} else if (tmpres != ISC_R_SUCCESS) {
parser_error(ISC_FALSE,
"failed to set zone notify-forward");
YYABORT;
}
}
#endif /* NOMINUM_PUBLIC */
| L_PUBKEY L_INTEGER L_INTEGER L_INTEGER L_QSTRING
{
dns_c_zone_t *zone = dns_c_ctx_getcurrzone(currcfg);
@@ -6120,9 +6065,6 @@ static struct token keyword_tokens [] = {
{ "notify", L_NOTIFY },
{ "notify-source", L_NOTIFY_SOURCE },
{ "notify-source-v6", L_NOTIFY_SOURCE_V6 },
#ifndef NOMINUM_PUBLIC
{ "notify-forward", L_NOTIFY_FORWARD },
#endif /* NOMINUM_PUBLIC */
{ "notify-passive", L_NOTIFY_PASSIVE },
{ "null", L_NULL_OUTPUT },
{ "one-answer", L_ONE_ANSWER },

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: confview.c,v 1.72 2001/01/30 22:02:27 gson Exp $ */
/* $Id: confview.c,v 1.73 2001/02/24 00:58:57 bwelling Exp $ */
#include <config.h>
@@ -577,10 +577,6 @@ dns_c_view_new(isc_mem_t *mem, const char *name, dns_rdataclass_t viewclass,
view->min_refresh_time = NULL;
view->max_refresh_time = NULL;
#ifndef NOMINUM_PUBLIC
view->notify_forward = NULL;
#endif /* NOMINUM_PUBLIC */
view->transfer_format = NULL;
view->keydefs = NULL;
view->peerlist = NULL;
@@ -820,9 +816,6 @@ dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view) {
PRINT_AS_BOOLEAN(additional_from_auth, "additional-from-auth");
PRINT_AS_BOOLEAN(additional_from_cache, "additional-from-cache");
PRINT_AS_BOOLEAN(statistics, "statistics");
#ifndef NOMINUM_PUBLIC
PRINT_AS_BOOLEAN(notify_forward, "notify-forward");
#endif /* NOMINUM_PUBLIC */
PRINT_IPANDPORT(notify_source, "notify-source");
PRINT_IPANDPORT(notify_source_v6, "notify-source-v6");
@@ -989,10 +982,6 @@ dns_c_view_delete(dns_c_view_t **viewptr) {
FREEFIELD(min_refresh_time);
FREEFIELD(max_refresh_time);
#ifndef NOMINUM_PUBLIC
FREEFIELD(notify_forward);
#endif /* NOMINUM_PUBLIC */
FREEFIELD(transfer_format);
dns_c_view_unsetkeydefs(view);
@@ -1585,10 +1574,6 @@ BOOL_FUNCS(statistics, statistics)
NOTIFYTYPE_FUNCS(notify, notify)
DIALUPTYPE_FUNCS(dialup, dialup)
#ifndef NOMINUM_PUBLIC
BOOL_FUNCS(notifyforward, notify_forward)
#endif /* NOMINUM_PUBLIC */
BOOL_FUNCS(rfc2308type1, rfc2308_type1)
BOOL_FUNCS(additionalfromcache, additional_from_cache)
BOOL_FUNCS(additionalfromauth, additional_from_auth)

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: confzone.c,v 1.77 2001/01/27 02:11:35 gson Exp $ */
/* $Id: confzone.c,v 1.78 2001/02/24 00:58:59 bwelling Exp $ */
#include <config.h>
@@ -74,9 +74,6 @@
#define SZ_MAX_RETRY_TIME_BIT 15
#define SZ_MIN_REFRESH_TIME_BIT 16
#define SZ_MAX_REFRESH_TIME_BIT 17
#ifndef NOMINUM_PUBLIC
#define SZ_NOTIFY_RELAY_BIT 19
#endif /* NOMINUM_PUBLIC */
#define SZ_STATISTICS_BIT 20
#define SZ_NOTIFY_SOURCE_BIT 21
#define SZ_NOTIFY_SOURCE_V6_BIT 22
@@ -1941,109 +1938,6 @@ dns_c_zone_getalsonotify(dns_c_zone_t *zone, dns_c_iplist_t **retval) {
return (res);
}
#ifndef NOMINUM_PUBLIC
/*
*
*/
isc_result_t
dns_c_zone_setnotifyforward(dns_c_zone_t *zone, isc_boolean_t newval) {
isc_boolean_t existed = ISC_FALSE;
REQUIRE(DNS_C_ZONE_VALID(zone));
switch (zone->ztype) {
case dns_c_zone_master:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"master zones do not have a "
"notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_slave:
zone->u.szone.notify_forward = newval;
existed = DNS_C_CHECKBIT(SZ_NOTIFY_RELAY_BIT,
&zone->u.szone.setflags);
DNS_C_SETBIT(SZ_NOTIFY_RELAY_BIT, &zone->u.szone.setflags);
break;
case dns_c_zone_stub:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"stub zones do not have a notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_hint:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"hint zones do not have a notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_forward:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"forward zones do not have a "
"notify-forward field");
return (ISC_R_FAILURE);
}
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
}
/*
*
*/
isc_result_t
dns_c_zone_getnotifyforward(dns_c_zone_t *zone, isc_boolean_t *retval) {
isc_result_t res = ISC_R_SUCCESS;
REQUIRE(DNS_C_ZONE_VALID(zone));
REQUIRE(retval != NULL);
switch (zone->ztype) {
case dns_c_zone_master:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"master zones do not have a "
"notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_slave:
if (DNS_C_CHECKBIT(SZ_NOTIFY_RELAY_BIT,
&zone->u.szone.setflags)) {
*retval = zone->u.szone.notify_forward;
res = ISC_R_SUCCESS;
} else {
res = ISC_R_NOTFOUND;
}
break;
case dns_c_zone_stub:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"stub zones do not have a notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_hint:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"hint zones do not have a notify-forward field");
return (ISC_R_FAILURE);
case dns_c_zone_forward:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_CONFIG,
DNS_LOGMODULE_CONFIG, ISC_LOG_CRITICAL,
"forward zones do not have a "
"notify-forward field");
return (ISC_R_FAILURE);
}
return (res);
}
#endif /* NOMINUM_PUBLIC */
/*
*
@@ -5152,14 +5046,6 @@ slave_zone_print(FILE *fp, int indent, dns_c_slavezone_t *szone) {
fprintf(fp, "max-refresh-time %d;\n", szone->max_refresh_time);
}
#ifndef NOMINUM_PUBLIC
if (DNS_C_CHECKBIT(SZ_NOTIFY_RELAY_BIT, &szone->setflags)) {
dns_c_printtabs(fp, indent);
fprintf(fp, "notify-forward %s;\n",
(szone->notify_forward ? "true" : "false"));
}
#endif /* NOMINUM_PUBLIC */
if (szone->also_notify != NULL) {
dns_c_printtabs(fp, indent);
fprintf(fp, "also-notify ");

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zone.c,v 1.308 2001/02/23 22:32:07 marka Exp $ */
/* $Id: zone.c,v 1.309 2001/02/24 00:58:53 bwelling Exp $ */
#include <config.h>
@@ -395,9 +395,6 @@ static void notify_send(dns_notify_t *notify);
static isc_result_t notify_createmessage(dns_zone_t *zone,
unsigned int flags,
dns_message_t **messagep);
#ifndef NOMINUM_PUBLIC
static void zone_notifyforward(dns_zone_t *zone);
#endif /* NOMINUM_PUBLIC */
static void notify_done(isc_task_t *task, isc_event_t *event);
static void notify_send_toaddr(isc_task_t *task, isc_event_t *event);
static isc_result_t zone_dump(dns_zone_t *);
@@ -2483,48 +2480,6 @@ notify_send(dns_notify_t *notify) {
notify_destroy(new, ISC_TRUE);
}
#ifndef NOMINUM_PUBLIC
static void
zone_notifyforward(dns_zone_t *zone) {
isc_result_t result;
const char me[] = "zone_notifyforward";
dns_notify_t *notify = NULL;
unsigned int i;
isc_sockaddr_t dst;
/*
* Locked by caller.
*/
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(LOCKED_ZONE(zone));
ENTER;
/*
* Enqueue notify requests for 'also-notify' servers.
*/
for (i = 0; i < zone->masterscnt; i++) {
dst = zone->masters[i];
if (notify_isqueued(zone, NULL, &dst))
continue;
result = notify_create(zone->mctx, DNS_NOTIFY_NOSOA, &notify);
if (result != ISC_R_SUCCESS) {
return;
}
zone_iattach(zone, &notify->zone);
notify->dst = dst;
ISC_LIST_APPEND(zone->notifies, notify, link);
result = notify_send_queue(notify);
if (result != ISC_R_SUCCESS) {
notify_destroy(notify, ISC_TRUE);
return;
}
notify = NULL;
}
}
#endif /* NOMINUM_PUBLIC */
void
dns_zone_notify(dns_zone_t *zone) {
isc_stdtime_t now;
@@ -3945,9 +3900,6 @@ dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
char fromtext[ISC_SOCKADDR_FORMATSIZE];
int match = 0;
isc_netaddr_t netaddr;
#ifndef NOMINUM_PUBLIC
isc_boolean_t forward = ISC_FALSE;
#endif /* NOMINUM_PUBLIC */
REQUIRE(DNS_ZONE_VALID(zone));
@@ -4014,10 +3966,6 @@ dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
if (i >= zone->masterscnt && zone->notify_acl != NULL &&
dns_acl_match(&netaddr, NULL, zone->notify_acl, NULL, &match,
NULL) == ISC_R_SUCCESS && match > 0) {
#ifndef NOMINUM_PUBLIC
if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOTIFYFORWARD))
forward = ISC_TRUE;
#endif /* NOMINUM_PUBLIC */
/* Accept notify. */
} else if (i >= zone->masterscnt) {
UNLOCK_ZONE(zone);
@@ -4061,14 +4009,6 @@ dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
}
}
#ifndef NOMINUM_PUBLIC
if (forward) {
zone_notifyforward(zone);
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
#endif /* NOMINUM_PUBLIC */
/*
* If we got this far and there was a refresh in progress just
* let it complete. Record where we got the notify from so we

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.21 2001/02/23 04:52:29 tale Exp $ */
/* $Id: parser.c,v 1.22 2001/02/24 00:59:00 bwelling Exp $ */
#include <config.h>
@@ -786,9 +786,6 @@ view_clauses[] = {
{ "sortlist", &cfg_type_bracketed_aml, 0 },
{ "topology", &cfg_type_bracketed_aml, CFG_CLAUSEFLAG_NOTIMP },
{ "auth-nxdomain", &cfg_type_boolean, CFG_CLAUSEFLAG_NEWDEFAULT },
#ifndef NOMINUM_PUBLIC
{ "notify-forward", &cfg_type_boolean, 0 },
#endif /* NOMINUM_PUBLIC */
{ "recursion", &cfg_type_boolean, 0 },
{ "provide-ixfr", &cfg_type_boolean, 0 },
{ "request-ixfr", &cfg_type_boolean, 0 },