zone.c revision 2bd70b68227f7141ba6b4d813cf84f94e68c1809
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Copyright (C) 1999, 2000 Internet Software Consortium.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Permission to use, copy, modify, and distribute this software for any
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * purpose with or without fee is hereby granted, provided that the above
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * copyright notice and this permission notice appear in all copies.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt/* $Id: zone.c,v 1.255 2000/11/18 02:54:18 gson Exp $ */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define RANGE(a, b, c) (((a) < (b)) ? (b) : ((a) < (c) ? (a) : (c)))
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Default values.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define MAX_XFER_TIME (2*3600) /* Documented default is 2 hours */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Unlocked */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int magic;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Locked */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int erefs;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int irefs;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int flags;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int options;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int db_argc;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int masterscnt;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int curmaster;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int refreshcnt;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int notifycnt;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Access Control Lists */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Zones in certain states such as "waiting for zone transfer"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * or "zone transfer in progress" are kept on per-state linked lists
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * in the zone manager using the 'statelink' field. The 'statelist'
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * field points at the list the zone is currently on. It the zone
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * is not on any such list, statelist is NULL.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Optional per-zone statistics counters
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONE_FLAG(z,f) (((z)->flags & (f)) != 0)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* XXX MPA these may need to go back into zone.h */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_REFRESH 0x00000001U /* refresh check in progress */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_NEEDDUMP 0x00000002U /* zone need consolidation */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_USEVC 0x00000004U /* use tcp for refresh query */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_DUMPING 0x00000008U /* a dump is in progress */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_HASINCLUDE 0x00000010U /* $INCLUDE in zone file */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_LOADED 0x00000020U /* database has loaded */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_EXITING 0x00000040U /* zone is being destroyed */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_EXPIRED 0x00000080U /* zone has expired */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_NEEDREFRESH 0x00000100U /* refresh check needed */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_UPTODATE 0x00000200U /* zone contents are
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * uptodate */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_NEEDNOTIFY 0x00000400U /* need to send out notify
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * messages */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_DIFFONRELOAD 0x00000800U /* generate a journal diff on
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_NOMASTERS 0x00001000U /* an attempt to refresh a
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * zone with no masters
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * occured */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_LOADING 0x00002000U /* load from disk in progress*/
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_HAVETIMERS 0x00004000U /* timer values have been set
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * from SOA (if not set, we
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * are still using
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * default timer values) */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONEFLG_FORCELOAD 0x00008000U /* Force a reload */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int magic;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Locked by rwlock. */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Locked by conflock. */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Locked by iolock */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Hold notify state.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int flags;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int attempt;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * dns_stub holds state while performing a 'stub' transfer.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * 'db' is the zone's 'db' or a new one if this is the initial
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Hold load state.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Hold forward state.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Hold IO request state.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Names of the zone counters
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntconst char *dns_zonecount_names[] = {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt "DELEGATION",
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt "RECURSION",
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt "SERVFAIL" };
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zone_settimer(dns_zone_t *, isc_stdtime_t);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_log(dns_zone_t *zone, const char *, int, const char *msg,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void notify_log(dns_zone_t *zone, int level, const char *fmt, ...);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zone_replacedb(dns_zone_t *zone, dns_db_t *db,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t default_journal(dns_zone_t *zone);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_xfrdone(dns_zone_t *zone, isc_result_t result);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zone_postload(dns_zone_t *zone, dns_db_t *db,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_needdump(dns_zone_t *zone, unsigned int delay);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_shutdown(isc_task_t *, isc_event_t *);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_loaddone(void *arg, isc_result_t result);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zone_startload(dns_db_t *db, dns_zone_t *zone,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt/* ondestroy example */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void dns_zonemgr_dbdestroyed(isc_task_t *task, isc_event_t *event);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void refresh_callback(isc_task_t *, isc_event_t *);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void stub_callback(isc_task_t *, isc_event_t *);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void soa_query(isc_task_t *, isc_event_t *);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic int message_count(dns_message_t *msg, dns_section_t section,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void notify_find_address(dns_notify_t *notify);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t notify_createmessage(dns_zone_t *zone,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt unsigned int flags,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void notify_done(isc_task_t *task, isc_event_t *event);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void notify_send_toaddr(isc_task_t *task, isc_event_t *event);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void got_transfer_quota(isc_task_t *task, isc_event_t *event);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic isc_result_t zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntzone_get_from_db(dns_db_t *db, dns_name_t *origin, unsigned int *nscount,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void forward_callback(isc_task_t *task, isc_event_t *event);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntstatic void zone_saveunique(dns_zone_t *zone, const char *path,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt const char *templat);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define ZONE_LOG(x,y) zone_log(zone, me, ISC_LOG_DEBUG(x), y)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_ENTER zone_log(zone, me, ISC_LOG_DEBUG(1), "enter")
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#define DNS_LEAVE zone_log(zone, me, ISC_LOG_DEBUG(1), "leave")
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt *** Public functions.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntdns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt "isc_mutex_init() failed: %s",
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* XXX MPA check that all elements are initialised */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt#endif /* NOMINUM_PUBLIC */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /* Must be after magic is set. */
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt result = dns_zone_setdbtype(zone, dbargc_default, dbargv_default);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ISC_EVENT_INIT(&zone->ctlevent, sizeof(zone->ctlevent), 0, NULL,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * Free a zone. Because we require that there be no more
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt * outstanding events or references, no locking is necessary.
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
goto nomem;
for (i = 0; i < dbargc; i++)
for (i = 0; i < dbargc; i++) {
goto nomem;
goto unlock;
for (i = 0; i < dbargc; i++) {
return (result);
return (result);
static isc_result_t
char *copy;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
char *journal;
return (ISC_R_NOMEMORY);
return (result);
return (result);
goto cleanup;
goto cleanup;
goto cleanup;
&db);
goto cleanup;
goto cleanup;
return (result);
goto fail;
goto fail;
fail:
static isc_result_t
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
return (result);
return (result);
static isc_result_t
unsigned int soacount = 0;
unsigned int nscount = 0;
goto cleanup;
goto cleanup;
goto cleanup;
nscount = 0;
soacount = 0;
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
goto cleanup;
if (nscount == 0)
isc_time_t t;
goto cleanup;
zone,
sizeof(isc_event_t));
goto cleanup;
if (needdump)
return (result);
return (result);
static isc_result_t
unsigned int *nscount)
unsigned int count;
*nscount = 0;
goto invalidate_rdataset;
goto invalidate_rdataset;
count = 0;
count++;
return (result);
static isc_result_t
unsigned int *soacount,
unsigned int count;
goto invalidate_rdataset;
count = 0;
count++;
if (count > 0) {
return (result);
static isc_result_t
goto closeversion;
minimum);
return (answer);
if (free_now)
if (value)
if (value)
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
goto unlock;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
#ifndef NOMINUM_PUBLIC
return (result);
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
sizeof(dns_name_t));
if (count == 0)
goto unlock;
goto unlock;
#ifndef NOMINUM_PUBLIC
goto unlock;
for (i = 0; i < count; i++)
for (i = 0; i < count; i++) {
sizeof(dns_name_t));
goto allocfail;
newname[i]);
for (i = 0; i < count; i++)
newname[i],
goto unlock;
return (result);
return (result);
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_master:
case dns_zone_slave:
case dns_zone_master:
case dns_zone_slave:
return (result);
return (result);
static isc_result_t
return (result);
return (ISC_R_SUCCESS);
return (result);
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
static isc_boolean_t
return (ISC_TRUE);
return (ISC_TRUE);
return (ISC_FALSE);
if (!locked)
if (!locked)
static isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
unsigned int options;
goto destroy;
goto destroy;
static isc_result_t
isc_event_t *e;
if (e == NULL)
return (ISC_R_NOMEMORY);
isc_event_free(&e);
return (result);
goto cleanup;
goto cleanup;
goto cleanup;
addrbuf);
case PF_INET:
case PF_INET6:
goto cleanup;
&new);
goto cleanup;
goto cleanup;
#ifndef NOMINUM_PUBLIC
unsigned int flags = 0;
goto cleanup1;
goto cleanup2;
goto cleanup3;
goto cleanup3;
if (isqueued) {
static inline isc_result_t
goto fail;
goto fail;
goto fail;
&rdataset);
goto fail;
goto fail;
&rdataset);
goto fail;
goto fail;
&rdataset);
goto fail;
goto fail;
goto fail;
return (ISC_R_SUCCESS);
fail:
return (result);
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto same_master;
goto next_master;
if (cnamecnt != 0) {
goto next_master;
if (nscnt == 0) {
goto next_master;
goto next_master;
goto free_stub;
goto free_stub;
goto free_stub;
goto detach;
goto same_master;
master);
goto next_master;
goto next_master;
goto next_master;
goto next_master;
master);
goto tcp_transfer;
master);
goto next_master;
goto same_master;
goto next_master;
if (cnamecnt != 0) {
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
#ifndef NOMINUM_PUBLIC
isc_time_t t;
goto next_master;
goto next_master;
isc_event_t *e;
if (e == NULL) {
isc_event_free(&e);
static inline isc_result_t
&message);
goto cleanup;
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
goto cleanup;
DNS_REQUESTOPT_TCP : 0;
case PF_INET:
case PF_INET6:
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&node);
goto cleanup;
goto cleanup;
case PF_INET:
case PF_INET6:
goto cleanup;
goto cleanup;
static isc_result_t
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
if (next == 0) {
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
isc_region_t r;
&message);
return (result);
goto cleanup;
goto cleanup;
goto done;
goto soa_cleanup;
goto soa_cleanup;
goto soa_cleanup;
goto soa_cleanup;
goto soa_cleanup;
NULL);
goto soa_cleanup;
goto soa_cleanup;
goto soa_cleanup;
isc_buffer_usedregion(b, &r);
goto soa_cleanup;
goto soa_cleanup;
done:
return (ISC_R_SUCCESS);
return (result);
#ifndef NOMINUM_PUBLIC
int match = 0;
return (DNS_R_FORMERR);
return (DNS_R_NOTIMP);
return (ISC_R_SUCCESS);
#ifndef NOMINUM_PUBLIC
return (DNS_R_REFUSED);
&rdataset);
fromtext);
return (ISC_R_SUCCESS);
#ifndef NOMINUM_PUBLIC
if (forward) {
return (ISC_R_SUCCESS);
fromtext);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
int count = 0;
count++;
return (count);
if (idlein == 0)
return (result);
static isc_result_t
goto fail;
goto fail;
return (ISC_R_SUCCESS);
fail:
return (result);
unsigned int soacount;
unsigned int nscount;
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_UPTODATE:
goto same_master;
isc_time_t t;
nscount = 0;
soacount = 0;
if (nscount == 0)
#ifndef NOMINUM_PUBLIC
case DNS_R_ZONETOOLARGE:
goto cleanup;
#ifndef NOMINUM_PUBLIC
static isc_result_t
return (ISC_R_NOMORE);
case PF_INET:
case PF_INET6:
goto unlock;
return (result);
goto next_master;
goto next_master;
goto next_master;
case dns_rcode_noerror:
case dns_rcode_yxdomain:
case dns_rcode_yxrrset:
case dns_rcode_nxrrset:
case dns_rcode_refused:
case dns_rcode_nxdomain:
case dns_rcode_notzone:
case dns_rcode_notauth: {
goto next_master;
case dns_rcode_formerr:
case dns_rcode_servfail:
case dns_rcode_notimp:
case dns_rcode_badvers:
goto next_master;
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
return (ISC_R_NOMORE);
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
goto free_mem;
goto free_rwlock;
goto free_conflock;
goto free_taskpool;
goto free_task;
goto free_rl;
return (ISC_R_SUCCESS);
return (result);
goto cleanup_task;
goto unlock;
return (result);
if (free_now)
if (free_now)
dns_zone_t *p;
p != NULL;
return (ISC_R_SUCCESS);
static isc_result_t
dns_zone_t *x;
isc_event_t *e;
x != NULL;
nxfrsin++;
nxfrsperns++;
return (ISC_R_QUOTA);
return (ISC_R_QUOTA);
sizeof(isc_event_t));
if (e == NULL)
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_NOMEMORY);
if (queue) {
if (!queue) {
return (ISC_R_SUCCESS);
if (send_event) {
char *buf;
int buflen;
goto cleanup;
goto cleanup;
return (count);
dns_zone_numbercounters(void) {
return (DNS_ZONE_COUNTSIZE);
for (i = 0; i < DNS_ZONE_COUNTSIZE; i++)
return (hascount);
goto done;
for (i = 0; i < DNS_ZONE_COUNTSIZE; i++)
done:
return (ISC_R_SUCCESS);
goto done;
done:
switch (dialup) {
case dns_dialuptype_no:
case dns_dialuptype_yes:
case dns_dialuptype_notify:
case dns_dialuptype_refresh:
case dns_dialuptype_passive:
INSIST(0);