zone.c revision cfa3ab7f89293811d60e2d5d16a30f3c22924b22
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Copyright (C) 1999-2001 Internet Software Consortium.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Permission to use, copy, modify, and distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews/* $Id: zone.c,v 1.336 2001/08/31 02:01:56 marka Exp $ */
89740699cd2191d9b84e67716c281b2dfeba5e56Evan Hunt#define DNS_ZONE_VALID(zone) ISC_MAGIC_VALID(zone, ZONE_MAGIC)
89740699cd2191d9b84e67716c281b2dfeba5e56Evan Hunt#define DNS_NOTIFY_VALID(notify) ISC_MAGIC_VALID(notify, NOTIFY_MAGIC)
89740699cd2191d9b84e67716c281b2dfeba5e56Evan Hunt#define DNS_STUB_VALID(stub) ISC_MAGIC_VALID(stub, STUB_MAGIC)
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define ZONEMGR_MAGIC ISC_MAGIC('Z', 'm', 'g', 'r')
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEMGR_VALID(stub) ISC_MAGIC_VALID(stub, ZONEMGR_MAGIC)
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define LOAD_MAGIC ISC_MAGIC('L', 'o', 'a', 'd')
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt#define DNS_LOAD_VALID(load) ISC_MAGIC_VALID(load, LOAD_MAGIC)
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt#define FORWARD_MAGIC ISC_MAGIC('F', 'o', 'r', 'w')
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt#define DNS_FORWARD_VALID(load) ISC_MAGIC_VALID(load, FORWARD_MAGIC)
68116c5a5fd36fef812fc207de3b7714db2994d5Evan Hunt#define DNS_IO_VALID(load) ISC_MAGIC_VALID(load, IO_MAGIC)
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * Ensure 'a' is at least 'min' but not more than 'max'.
6643b0dd91249ace16218ef667967c87b291992cMark Andrews (((a) < (min)) ? (min) : ((a) < (max) ? (a) : (max)))
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * Default values.
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt#define MAX_XFER_TIME (2*3600) /* Documented default is 2 hours */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt do { (z)->locked = ISC_FALSE; UNLOCK(&(z)->lock); } while (0)
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews /* Unlocked */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int magic;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews /* Locked */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int irefs;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int flags;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int options;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int db_argc;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int masterscnt;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int curmaster;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int notifycnt;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt /* Access Control Lists */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * Zones in certain states such as "waiting for zone transfer"
6643b0dd91249ace16218ef667967c87b291992cMark Andrews * or "zone transfer in progress" are kept on per-state linked lists
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * in the zone manager using the 'statelink' field. The 'statelist'
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * field points at the list the zone is currently on. It the zone
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * is not on any such list, statelist is NULL.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Optional per-zone statistics counters (NULL if not present).
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONE_FLAG(z,f) (ISC_TF(((z)->flags & (f)) != 0))
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONE_SETFLAG(z,f) do { \
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews (z)->flags |= (f); \
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONE_CLRFLAG(z,f) do { \
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews (z)->flags &= ~(f); \
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews /* XXX MPA these may need to go back into zone.h */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_REFRESH 0x00000001U /* refresh check in progress */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_NEEDDUMP 0x00000002U /* zone need consolidation */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_USEVC 0x00000004U /* use tcp for refresh query */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_DUMPING 0x00000008U /* a dump is in progress */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_HASINCLUDE 0x00000010U /* $INCLUDE in zone file */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_LOADED 0x00000020U /* database has loaded */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_EXITING 0x00000040U /* zone is being destroyed */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_EXPIRED 0x00000080U /* zone has expired */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_NEEDREFRESH 0x00000100U /* refresh check needed */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_UPTODATE 0x00000200U /* zone contents are
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * uptodate */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_NEEDNOTIFY 0x00000400U /* need to send out notify
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * messages */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_DIFFONRELOAD 0x00000800U /* generate a journal diff on
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_NOMASTERS 0x00001000U /* an attempt to refresh a
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * zone with no masters
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * occured */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_LOADING 0x00002000U /* load from disk in progress*/
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt#define DNS_ZONEFLG_HAVETIMERS 0x00004000U /* timer values have been set
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * from SOA (if not set, we
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * are still using
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * default timer values) */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLG_FORCEXFER 0x00008000U /* Force a zone xfer */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONEFLAG_NOIXFR 0x00100000U /* IXFR failed, force AXFR */
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews/* Flags for zone_load() */
66e50468dde42a9757ac489e738d8b2db8fd7f80Evan Hunt#define DNS_ZONELOADFLAG_NOSTAT 0x00000001U /* Do not stat() master files */
66e50468dde42a9757ac489e738d8b2db8fd7f80Evan Hunt unsigned int magic;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt /* Locked by rwlock. */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt /* Configuration data. */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt /* Locked by iolock */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * Hold notify state.
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int magic;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int flags;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int attempt;
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * dns_stub holds state while performing a 'stub' transfer.
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt * 'db' is the zone's 'db' or a new one if this is the initial
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int magic;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Hold load state.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int magic;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Hold forward state.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews unsigned int magic;
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews * Hold IO request state.
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt unsigned int magic;
66e50468dde42a9757ac489e738d8b2db8fd7f80Evan Huntstatic void zone_settimer(dns_zone_t *, isc_time_t *);
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsstatic void zone_debuglog(dns_zone_t *zone, const char *, int debuglevel,
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsstatic void notify_log(dns_zone_t *zone, int level, const char *fmt, ...)
68116c5a5fd36fef812fc207de3b7714db2994d5Evan Huntstatic void zone_iattach(dns_zone_t *source, dns_zone_t **target);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t zone_replacedb(dns_zone_t *zone, dns_db_t *db,
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t default_journal(dns_zone_t *zone);
68116c5a5fd36fef812fc207de3b7714db2994d5Evan Huntstatic void zone_xfrdone(dns_zone_t *zone, isc_result_t result);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t zone_postload(dns_zone_t *zone, dns_db_t *db,
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void zone_needdump(dns_zone_t *zone, unsigned int delay);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void zone_shutdown(isc_task_t *, isc_event_t *);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void zone_loaddone(void *arg, isc_result_t result);
6643b0dd91249ace16218ef667967c87b291992cMark Andrewsstatic isc_result_t zone_startload(dns_db_t *db, dns_zone_t *zone,
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Hunt/* ondestroy example */
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void dns_zonemgr_dbdestroyed(isc_task_t *task, isc_event_t *event);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void refresh_callback(isc_task_t *, isc_event_t *);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void stub_callback(isc_task_t *, isc_event_t *);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void soa_query(isc_task_t *, isc_event_t *);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset,
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic int message_count(dns_message_t *msg, dns_section_t section,
68116c5a5fd36fef812fc207de3b7714db2994d5Evan Huntstatic void notify_find_address(dns_notify_t *notify);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t notify_createmessage(dns_zone_t *zone,
6643b0dd91249ace16218ef667967c87b291992cMark Andrews unsigned int flags,
68116c5a5fd36fef812fc207de3b7714db2994d5Evan Huntstatic void notify_done(isc_task_t *task, isc_event_t *event);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void notify_send_toaddr(isc_task_t *task, isc_event_t *event);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t zone_dump(dns_zone_t *, isc_boolean_t);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic void got_transfer_quota(isc_task_t *task, isc_event_t *event);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr,
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsstatic void zmgr_resume_xfrs(dns_zonemgr_t *zmgr);
56c9fcf07580457442b80ac32bdb7c07aa0df870Evan Huntstatic isc_result_t zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewszone_get_from_db(dns_db_t *db, dns_name_t *origin, unsigned int *nscount,
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsstatic void forward_callback(isc_task_t *task, isc_event_t *event);
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsstatic void zone_saveunique(dns_zone_t *zone, const char *path,
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews const char *templat);
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews#define ENTER zone_debuglog(zone, me, 1, "enter")
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrews *** Public functions.
d76ed813a51465e5c47d521ab09ea20c06f1428dMark Andrewsdns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
9b956d342e93ab60d5d9367785b26546f7e49391Mark Andrews "isc_mutex_init() failed: %s",
9b956d342e93ab60d5d9367785b26546f7e49391Mark Andrews /* XXX MPA check that all elements are initialised */
9b956d342e93ab60d5d9367785b26546f7e49391Mark Andrews isc_refcount_init(&zone->erefs, 1); /* Implicit attach. */
goto free_mutex;
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
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);
static isc_boolean_t
static isc_result_t
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&filetime);
goto cleanup;
goto cleanup;
&db);
goto cleanup;
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);
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:
if (nscount == 0) {
goto cleanup;
isc_time_t t;
goto cleanup;
zone,
sizeof(isc_event_t));
goto cleanup;
if (needdump)
return (result);
return (result);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
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);
unsigned int refs;
if (refs == 0) {
if (free_now)
if (free_needed)
if (value)
if (value)
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
goto unlock;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (result);
sizeof(dns_name_t));
if (count == 0)
goto unlock;
goto unlock;
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);
static inline isc_boolean_t
if (!dumping) {
return (dumping);
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_master:
case dns_zone_slave:
if (!dumping) {
case dns_zone_master:
case dns_zone_slave:
goto unlock;
goto unlock;
if (!dumping)
return (result);
if (!dumping)
return (result);
static isc_result_t
redo:
goto fail;
goto fail;
switch (tresult) {
case ISC_R_SUCCESS:
case ISC_R_NOSPACE:
fail:
if (again)
goto redo;
return (result);
return (DNS_R_NOTLOADED);
return (result);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_TRUE);
return (ISC_FALSE);
if (!locked)
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);
int timeout;
goto cleanup;
goto cleanup;
goto cleanup;
addrbuf);
case PF_INET:
case PF_INET6:
goto cleanup_key;
&new);
goto cleanup;
goto cleanup;
unsigned int flags = 0;
goto cleanup1;
goto cleanup2;
&master);
goto cleanup3;
goto cleanup3;
if (!loggednotify) {
serial);
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;
master);
goto next_master;
goto same_master;
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 done;
done:
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;
goto next_master;
goto next_master;
goto detach;
goto detach;
goto detach;
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);
int timeout;
goto cleanup;
goto cleanup;
DNS_REQUESTOPT_TCP : 0;
case PF_INET:
case PF_INET6:
goto cleanup;
goto cleanup;
if (cancel)
int timeout;
goto cleanup;
goto cleanup;
&node);
goto cleanup;
goto cleanup;
case PF_INET:
case PF_INET6:
goto cleanup;
goto cleanup;
goto unlock;
if (free_needed)
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
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);
int match = 0;
return (DNS_R_FORMERR);
return (DNS_R_NOTIMP);
return (ISC_R_SUCCESS);
match > 0)
return (DNS_R_REFUSED);
&rdataset);
fromtext);
return (ISC_R_SUCCESS);
fromtext);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
const char *fmt, ...)
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;
&now);
nscount = 0;
soacount = 0;
if (nscount == 0)
case DNS_R_BADIXFR:
goto same_master;
goto cleanup;
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_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;
if (value == 0)
ns = 0;
if (on) {
goto done;
goto done;
done:
return (result);
switch (dialup) {
case dns_dialuptype_no:
case dns_dialuptype_yes:
case dns_dialuptype_notify:
case dns_dialuptype_refresh:
case dns_dialuptype_passive:
INSIST(0);
unsigned int count = 0;
switch (state) {
count++;
count++;
case DNS_ZONESTATE_SOAQUERY:
count++;
case DNS_ZONESTATE_ANY:
count++;
INSIST(0);
return (count);