From e4e183af576855f4ccc9fc28084ffe095aaa5b55 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 20 Apr 2000 20:58:50 +0000 Subject: [PATCH] the zone object's master and also-notify lists grew longer with each reload --- CHANGES | 3 +++ bin/named/zoneconf.c | 12 ++++++------ lib/dns/zoneconf.c | 12 ++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 7c9586262f..bae3c47c1a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ + 69. [bug] The zone object's master and also-notify lists grew + longer with each server reload. + 68. [func] Partial support for SIG(0) on incoming messages. 67. [performance] Allow use of alternate (compile-time supplied) diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 3d68ff6b4b..3ca0ac60a2 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -177,6 +177,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, else dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, ISC_TRUE); + dns_zone_clearnotify(zone); result = dns_c_zone_getalsonotify(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -185,8 +186,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearnotify(zone); + } result = dns_c_zone_getmaxtranstimeout(czone, &maxxfr); if (result != ISC_R_SUCCESS && cview != NULL) @@ -256,6 +256,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, port = 53; dns_zone_setmasterport(zone, port); + dns_zone_clearmasters(zone); result = dns_c_zone_getmasterips(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -264,8 +265,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearmasters(zone); + } result = dns_c_zone_getmaxtranstimein(czone, &maxxfr); if (result != ISC_R_SUCCESS) @@ -348,6 +348,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, port = 53; dns_zone_setmasterport(zone, port); + dns_zone_clearmasters(zone); result = dns_c_zone_getmasterips(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -356,8 +357,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearmasters(zone); + } result = dns_c_zone_getmaxtranstimein(czone, &maxxfr); if (result != ISC_R_SUCCESS) diff --git a/lib/dns/zoneconf.c b/lib/dns/zoneconf.c index 3d68ff6b4b..3ca0ac60a2 100644 --- a/lib/dns/zoneconf.c +++ b/lib/dns/zoneconf.c @@ -177,6 +177,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, else dns_zone_setoption(zone, DNS_ZONE_O_NOTIFY, ISC_TRUE); + dns_zone_clearnotify(zone); result = dns_c_zone_getalsonotify(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -185,8 +186,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearnotify(zone); + } result = dns_c_zone_getmaxtranstimeout(czone, &maxxfr); if (result != ISC_R_SUCCESS && cview != NULL) @@ -256,6 +256,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, port = 53; dns_zone_setmasterport(zone, port); + dns_zone_clearmasters(zone); result = dns_c_zone_getmasterips(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -264,8 +265,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearmasters(zone); + } result = dns_c_zone_getmaxtranstimein(czone, &maxxfr); if (result != ISC_R_SUCCESS) @@ -348,6 +348,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, port = 53; dns_zone_setmasterport(zone, port); + dns_zone_clearmasters(zone); result = dns_c_zone_getmasterips(czone, &iplist); if (result == ISC_R_SUCCESS) { for (i = 0; i < iplist->nextidx; i++) { @@ -356,8 +357,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, if (result != ISC_R_SUCCESS) return (result); } - } else - dns_zone_clearmasters(zone); + } result = dns_c_zone_getmaxtranstimein(czone, &maxxfr); if (result != ISC_R_SUCCESS)