zone.c revision fc03bf680ead53bb5fdedbbc8da1c394051a793d
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Copyright (C) 1999, 2000 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Permission to use, copy, modify, and distribute this software for any
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * purpose with or without fee is hereby granted, provided that the above
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
10a6f640ed599cbe4a8b98c46b71a61d24e5bbe7Tatuya JINMEI 神明達哉/* $Id: zone.c,v 1.274 2000/12/11 19:21:15 marka Exp $ */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#define RANGE(a, b, c) (((a) < (b)) ? (b) : ((a) < (c) ? (a) : (c)))
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * Default values.
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define MAX_XFER_TIME (2*3600) /* Documented default is 2 hours */
03a0fca86dd9db6a40743107ec9dea7c33e46a7aDavid Lawrence do { (z)->locked = ISC_FALSE; UNLOCK(&(z)->lock); } while (0)
001d1ceec69e181f62367f4d344fb386135d91b1Andreas Gustafsson /* Unlocked */
e61793f0865117ad87a19d6e245bea8f3b712d1bDanny Mayer /* Locked */
03a0fca86dd9db6a40743107ec9dea7c33e46a7aDavid Lawrence ISC_LINK(dns_zone_t) link; /* Used by zmgr. */
03a0fca86dd9db6a40743107ec9dea7c33e46a7aDavid Lawrence unsigned int erefs;
03a0fca86dd9db6a40743107ec9dea7c33e46a7aDavid Lawrence unsigned int irefs;
03a0fca86dd9db6a40743107ec9dea7c33e46a7aDavid Lawrence unsigned int flags;
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff unsigned int options;
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein unsigned int db_argc;
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#endif /* NOMINUM_PUBLIC */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#endif /* NOMINUM_PUBLIC */
1d1d2fa57a954333c32ca3104b812b4e2389196fBrian Wellington /* Access Control Lists */
10a6f640ed599cbe4a8b98c46b71a61d24e5bbe7Tatuya JINMEI 神明達哉#endif /* NOMINUM_PUBLIC */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * Zones in certain states such as "waiting for zone transfer"
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * or "zone transfer in progress" are kept on per-state linked lists
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * in the zone manager using the 'statelink' field. The 'statelist'
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * field points at the list the zone is currently on. It the zone
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * is not on any such list, statelist is NULL.
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * Optional per-zone statistics counters (NULL if not present).
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONE_FLAG(z,f) (ISC_TF(((z)->flags & (f)) != 0))
c1cfd8ef05f47f2ccb5db80639e9501c9f16864cMichael Graff#define DNS_ZONE_SETFLAG(z,f) do { \
47ee25b1f58a5924c51b59194b84621b9b7b6ba5Mark Andrews (z)->flags |= (f); \
1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6Andreas Gustafsson#define DNS_ZONE_CLRFLAG(z,f) do { \
c1cfd8ef05f47f2ccb5db80639e9501c9f16864cMichael Graff (z)->flags &= ~(f); \
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff /* XXX MPA these may need to go back into zone.h */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_REFRESH 0x00000001U /* refresh check in progress */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#define DNS_ZONEFLG_NEEDDUMP 0x00000002U /* zone need consolidation */
7a166c5c61a5aaa6eeb929bed152dc0a6b128e3dMichael Graff#define DNS_ZONEFLG_USEVC 0x00000004U /* use tcp for refresh query */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define DNS_ZONEFLG_DUMPING 0x00000008U /* a dump is in progress */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_HASINCLUDE 0x00000010U /* $INCLUDE in zone file */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_LOADED 0x00000020U /* database has loaded */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_EXITING 0x00000040U /* zone is being destroyed */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_EXPIRED 0x00000080U /* zone has expired */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_NEEDREFRESH 0x00000100U /* refresh check needed */
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein#define DNS_ZONEFLG_UPTODATE 0x00000200U /* zone contents are
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * uptodate */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define DNS_ZONEFLG_NEEDNOTIFY 0x00000400U /* need to send out notify
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * messages */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_DIFFONRELOAD 0x00000800U /* generate a journal diff on
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_NOMASTERS 0x00001000U /* an attempt to refresh a
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * zone with no masters
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * occured */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_LOADING 0x00002000U /* load from disk in progress*/
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define DNS_ZONEFLG_HAVETIMERS 0x00004000U /* timer values have been set
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * from SOA (if not set, we
5eb91bd90e3ad3426e5e3213031556a737cf3809Mark Andrews * are still using
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff * default timer values) */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff#define DNS_ZONEFLG_FORCELOAD 0x00008000U /* Force a reload */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define DNS_ZONE_OPTION(z,o) (((z)->options & (o)) != 0)
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff unsigned int magic;
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff /* Locked by rwlock. */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff /* Locked by conflock. */
64bed6c54393c2d213db83e9b171fb7c318cfc8eMichael Graff /* Locked by iolock */
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington * Hold notify state.
5b34d8267e8228b4615b9eae4e32d9ad1f308179Andreas Gustafsson * dns_stub holds state while performing a 'stub' transfer.
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington * 'db' is the zone's 'db' or a new one if this is the initial
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington * Hold load state.
47ee25b1f58a5924c51b59194b84621b9b7b6ba5Mark Andrews * Hold forward state.
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff * Hold IO request state.
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graffstatic void zone_settimer(dns_zone_t *, isc_stdtime_t);
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graffstatic void zone_log(dns_zone_t *zone, const char *, int, const char *msg,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void notify_log(dns_zone_t *zone, int level, const char *fmt, ...);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void queue_xfrin(dns_zone_t *zone);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_unload(dns_zone_t *zone);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_expire(dns_zone_t *zone);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_iattach(dns_zone_t *source, dns_zone_t **target);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_deletefile(dns_zone_t *zone);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington#endif /* NOMINUM_PUBLIC */
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic isc_result_t zone_replacedb(dns_zone_t *zone, dns_db_t *db,
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic isc_result_t default_journal(dns_zone_t *zone);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_xfrdone(dns_zone_t *zone, isc_result_t result);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic isc_result_t zone_postload(dns_zone_t *zone, dns_db_t *db,
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_needdump(dns_zone_t *zone, unsigned int delay);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_shutdown(isc_task_t *, isc_event_t *);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zone_loaddone(void *arg, isc_result_t result);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic isc_result_t zone_startload(dns_db_t *db, dns_zone_t *zone,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson/* ondestroy example */
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void dns_zonemgr_dbdestroyed(isc_task_t *task, isc_event_t *event);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void refresh_callback(isc_task_t *, isc_event_t *);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void stub_callback(isc_task_t *, isc_event_t *);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void queue_soa_query(dns_zone_t *zone);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void soa_query(isc_task_t *, isc_event_t *);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset,
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic int message_count(dns_message_t *msg, dns_section_t section,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void notify_cancel(dns_zone_t *zone);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void notify_find_address(dns_notify_t *notify);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void notify_send(dns_notify_t *notify);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic isc_result_t notify_createmessage(dns_zone_t *zone,
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_notifyforward(dns_zone_t *zone);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington#endif /* NOMINUM_PUBLIC */
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void notify_done(isc_task_t *task, isc_event_t *event);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void notify_send_toaddr(isc_task_t *task, isc_event_t *event);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic isc_result_t zone_dump(dns_zone_t *);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void got_transfer_quota(isc_task_t *task, isc_event_t *event);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic isc_result_t zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zmgr_resume_xfrs(dns_zonemgr_t *zmgr);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zonemgr_free(dns_zonemgr_t *zmgr);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic isc_result_t zonemgr_getio(dns_zonemgr_t *zmgr, isc_boolean_t high,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson isc_task_t *task, isc_taskaction_t action,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonstatic void zonemgr_putio(dns_io_t **iop);
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafssonzone_get_from_db(dns_db_t *db, dns_name_t *origin, unsigned int *nscount,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson unsigned int *soacount, isc_uint32_t *serial,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson isc_uint32_t *refresh, isc_uint32_t *retry,
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson isc_uint32_t *expire, isc_uint32_t *minimum);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_freedbargs(dns_zone_t *zone);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void forward_callback(isc_task_t *task, isc_event_t *event);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_saveunique(dns_zone_t *zone, const char *path,
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellingtonstatic void zone_maintenance(dns_zone_t *zone);
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington#define ZONE_LOG(x,y) zone_log(zone, me, ISC_LOG_DEBUG(x), y)
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington#define DNS_ENTER zone_log(zone, me, ISC_LOG_DEBUG(1), "enter")
8f80322fb58bac39c84bb76cb2bc82406bd6a9ecBrian Wellington#define DNS_LEAVE zone_log(zone, me, ISC_LOG_DEBUG(1), "leave")
7bee275ebe250b5e1705a997e2ee3e685d146fbdAndreas Gustafsson *** Public functions.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeindns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
0d51617897658fcd9eed3a22f7ac8d77a7a260beMark Andrews "isc_mutex_init() failed: %s",
b91bbaf50cf6d0c2cad7323720495165595e413bMichael Graff /* XXX MPA check that all elements are initialised */
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
#ifndef NOMINUM_PUBLIC
goto free_mutex;
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
#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);
static isc_boolean_t
goto cleanup;
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);
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 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;
#ifndef NOMINUM_PUBLIC
isc_time_t t;
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);
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;
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
if (next == 0) {
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;
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);