zone.c revision 6e70b15670957879f537a120a1fa3fa8e4a8307b
c110d61b173a68420d19858abb80285be0dc1120Tinderbox User * 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
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein /* $Id: zone.c,v 1.82 2000/02/24 21:40:51 gson Exp $ */
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellington/* XXX remove once config changes are in place */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#define dns_zone_uptodate(x) zone_log(x, me, ISC_LOG_INFO, "dns_zone_uptodate")
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt#define MAX_XFER_TIME (2*3600) /* Documented default is 2 hours. */
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt#define RANGE(a, b, c) (((a) < (b)) ? (b) : ((a) < (c) ? (a) : (c)))
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence#define DNS_MAX_EXPIRE 14515200 /* 24 weeks */
bfafdac0616107ff32389532e7040567cd84b8aaBrian Wellington#define DNS_DEFAULT_IDLEOUT 3600 /* 1 hour */
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrewstypedef enum {
fc39b6a96109b78154ec148d20eaf29e8abc14b6Mukund Sivaraman /* Unlocked */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews unsigned int magic;
6150d3cb666a58d5e3a15275562c9fc5c5b6b2d8Evan Hunt unsigned int erefs;
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews unsigned int irefs;
ecaed3593cd14f2491d1bd81fc98cb940e12f8bbMark Andrews unsigned int flags;
ecaed3593cd14f2491d1bd81fc98cb940e12f8bbMark Andrews unsigned int options;
ecaed3593cd14f2491d1bd81fc98cb940e12f8bbMark Andrews unsigned int db_argc;
629a0159401a6c0d991a78a6d0b90ee84e83668cEvan Hunt unsigned int masterscnt;
547411428e467f2a2848886eaac0a8b3e136a9abEvan Hunt unsigned int curmaster;
547411428e467f2a2848886eaac0a8b3e136a9abEvan Hunt unsigned int notifycnt;
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews /* Access Control Lists */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews ISC_LIST(dns_zone_checkservers_t) checkservers;
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_FLAG(z,f) (((z)->flags & (f)) != 0)
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews /* XXX MPA these may need to go back into zone.h */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_REFRESH 0x00000001U /* refresh check in progress */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_NEEDDUMP 0x00000002U /* zone need consolidation */
9bd876a683709be588f6fac6781a76fdd57b2f08Mark Andrews#define DNS_ZONE_F_SERVERS 0x00000004U /* servers check in progress */
9bd876a683709be588f6fac6781a76fdd57b2f08Mark Andrews#define DNS_ZONE_F_PARENTS 0x00000008U /* parents check in progress */
9bd876a683709be588f6fac6781a76fdd57b2f08Mark Andrews#define DNS_ZONE_F_CHILDREN 0x00000010U /* child check in progress */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_LOADED 0x00000020U /* database has loaded */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_EXITING 0x00000040U /* zone is being destroyed */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_EXPIRED 0x00000080U /* zone has expired */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_NEEDREFRESH 0x00000100U /* refresh check needed */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_F_UPTODATE 0x00000200U /* zone contents are
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews * uptodate */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews#define DNS_ZONE_OPTION(z,o) ((((z)->setoptions & (o)) != 0) ? \
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews (((z)->options & (o)) != 0) : \
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews /* Locked by rwlock. */
d96f74a3cb6212ac9e4a7a0fa8924f850348eae9Mark Andrews /* Maximum locked by conflock. */
87983da955bf63128de85d180359bdc418516c3cDavid Lawrencestatic isc_result_t zone_settimer(dns_zone_t *, isc_stdtime_t);
73a691c373488e4f70387a62462cd8ce0d991705David Lawrencestatic isc_result_t dns_notify(dns_name_t *, isc_sockaddr_t *, dns_rdatatype_t,
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence dns_rdataclass_t, isc_sockaddr_t *, isc_mem_t *);
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrencestatic void zone_log(dns_zone_t *zone, const char *, int, const char *msg,
b6b9d8b8434e4eaab74b69cd14fcacf448055ca5Brian Wellingtonextern void dns_zone_transfer_in(dns_zone_t *zone);
b493dfe8bce94b05efc0f161238d32f1234c5670Brian Wellingtonstatic isc_result_t dns_zone_tostr(dns_zone_t *zone, isc_mem_t *mctx,
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic isc_result_t replacedb(dns_zone_t *zone, dns_db_t *db,
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic isc_result_t default_journal(dns_zone_t *zone);
1d16cf8bb8596c3e4dc1123a5bdf360bf24a272bAutomatic Updaterstatic void releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic void xfrin_start_temporary_kludge(dns_zone_t *zone);
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic void xfrdone(dns_zone_t *zone, isc_result_t result);
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic void zone_shutdown(isc_task_t *, isc_event_t *);
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews/* ondestroy example */
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsstatic void dns_zonemgr_dbdestroyed(isc_task_t *task, isc_event_t *event);
b6b9d8b8434e4eaab74b69cd14fcacf448055ca5Brian Wellingtonstatic void refresh_callback(isc_task_t *, isc_event_t *);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonstatic void soa_query(dns_zone_t *, isc_taskaction_t);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonstatic void checkservers_callback(isc_task_t *task, isc_event_t *event);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonstatic int message_count(dns_message_t *msg, dns_section_t section,
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonstatic void add_address_tocheck(dns_message_t *msg,
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonstatic void record_serial(void);
f07fe5a1ac9d1345eb7a36a0bc38716a03e25f61Mark Andrews char *s = NULL; \
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#define DNS_ENTER zone_log(zone, me, ISC_LOG_DEBUG(10), "enter")
e4cd5a1e5d0358abeee7618b02b4592c055d957fBrian Wellington#define DNS_LEAVE zone_log(zone, me, ISC_LOG_DEBUG(10), "leave")
71ca6e64b4d208a090d255eb64c24f945e615ea0Brian Wellington *** Public functions.
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrewsdns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) {
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington isc_sockaddr_fromin(&sockaddr_any4, &in4addr_any, 0);
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence isc_sockaddr_fromin6(&sockaddr_any6, &in6addr_any, 0);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington "isc_mutex_init() failed: %s",
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington /* XXX MPA check that all elements are initialised */
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews ISC_EVENT_INIT(&zone->ctlevent, sizeof(zone->ctlevent), 0, NULL,
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews DNS_EVENT_ZONECONTROL, zone_shutdown, zone, zone,
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews /* managed objects */
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews /* order is important */
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt /* unmanaged objects */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington /* last stuff */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington isc_mem_put(zone->mctx, zone, sizeof *zone);
bcdf37e0ff7d73310b7bf247d755194a5718ba38Mark Andrews * Single shot.
bcdf37e0ff7d73310b7bf247d755194a5718ba38Mark Andrewsdns_zone_setclass(dns_zone_t *zone, dns_rdataclass_t rdclass) {
420e5e1022ff5ca4697ed5286462eeaf03614e53Brian Wellington /* test and set */
b6b9d8b8434e4eaab74b69cd14fcacf448055ca5Brian Wellington REQUIRE(zone->rdclass == dns_rdataclass_none ||
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt * Single shot.
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Huntdns_zone_settype(dns_zone_t *zone, dns_zonetype_t type) {
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt /* test and set */
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt REQUIRE(zone->type == dns_zone_none || zone->type == type);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtondns_zone_setdbtype(dns_zone_t *zone, char *db_type) {
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington zone->db_type = isc_mem_strdup(zone->mctx, db_type);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonvoid dns_zone_setview(dns_zone_t *zone, dns_view_t *view) {
73a691c373488e4f70387a62462cd8ce0d991705David Lawrencedns_view_t *dns_zone_getview(dns_zone_t *zone) {
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewsdns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin) {
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews result = dns_name_dup(origin, zone->mctx, &zone->origin);
b6b9d8b8434e4eaab74b69cd14fcacf448055ca5Brian Wellingtondns_zone_setdatabase(dns_zone_t *zone, const char *database) {
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews zone->database = isc_mem_strdup(zone->mctx, database);
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews len = strlen(zone->database) + sizeof ".jnl"; /* includes '\0' */
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt zone->journal = isc_mem_allocate(zone->mctx, len);
73a691c373488e4f70387a62462cd8ce0d991705David Lawrencedns_zone_setjournal(dns_zone_t *zone, const char *journal) {
4144efb39046963989ad002cf88a0c195401100aJeremy Reed zone->journal = isc_mem_strdup(zone->mctx, journal);
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews REQUIRE(dns_name_countlabels(&zone->origin) != 0);
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews /*FALLTHROUGH*/
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews result = dns_db_create(zone->mctx, zone->db_type,
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * Initiate zone transfer? We may need a error code that
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * indicates that the "permanent" form does not exist.
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * XXX better error feedback to log.
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt "no database file");
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt "database %s: dns_db_load failed: %s",
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews * Apply update log, if any.
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews result = dns_journal_rollforward(zone->mctx, db, zone->journal);
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews if (result != DNS_R_SUCCESS && result != DNS_R_NOTFOUND &&
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews result != DNS_R_UPTODATE && result != DNS_R_NOJOURNAL)
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews "journal out of sync with zone");
326bcfa0e2a6b924cb829a0bcc3bf9590ce21ad6Mark Andrews "dns_journal_rollforward: %s",
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews * Obtain ns and soa counts for top of zone.
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews result = dns_db_findnode(db, &zone->origin, ISC_FALSE, &node);
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews result = dns_db_findrdataset(db, node, version,
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews result = dns_db_findrdataset(db, node, version,
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews * Master / Slave / Stub zones require both NS and SOA records at
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews * the top of the zone.
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews * Hint zones only require NS records.
7389e8330d62a059b8923fb8ca6f933caeb559d9Mark Andrews * Cache zones have no reqirements.
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews "no NS records");
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews if (!isc_serial_ge(soa.serial, zone->serial)) {
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews "zone serial has gone backwards");
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews zone->refresh = RANGE(soa.refresh, DNS_MIN_REFRESH,
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews zone->retry = RANGE(soa.retry, DNS_MIN_REFRESH,
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews zone->expire = RANGE(soa.expire, zone->refresh + zone->retry,
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews /* XXX need database modification time */
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence zone_log(zone, me, ISC_LOG_ERROR, "no NS records");
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence /* destroy notification example. */
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence isc_event_t *e = isc_event_allocate(zone->mctx, NULL,
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews unsigned int i;
5096958739769958dd7a6b69356bf41260033873David Lawrence /* XXX MPA */
5096958739769958dd7a6b69356bf41260033873David Lawrence * get NS list from database, add in notify also list
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence result = dns_db_findnode(zone->top, zonename, ISC_FALSE, &node);
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence result = dns_db_findrdataset(zone->top, node, version,
9e804040a29b9c3066c8471b43835f30707039b7Evan Hunt result = dns_rdata_tostruct(&rdata, &ns, zone->mctx);
3734f3f1bad4160cdd7563bc4801bca7e82f8abdDavid Lawrence dns_resolver_attach(zone->res, &checkservers->res);
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews /* XXX lookup A/AAAA/A6 records */
0f8c9b5eed7e8714ceb7d6d3675555df9c5f6350Mark Andrews dns_db_closeversion(zone->top, &version, ISC_FALSE);
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * Foreach NS in NS list perform a non-recursive query to obtain
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * NS list for zone (remove self from list).
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * callback to check:
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * If NXDOMAIN -> log error.
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * If NODATA -> log error.
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence * If referral -> log error.
73a691c373488e4f70387a62462cd8ce0d991705David Lawrence * If non-auth -> log error.
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * Compare NS list returned with server list if not identical
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews * log error if current list is at least 3 x refresh old.
72ddc4cef9c6a6de53aae530dea1ddbb90631131Mark Andrews * Compare glue A/AAAA/A6 records.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington * Foreach NS in NS list perform a non-recursive query to obtain
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence * SOA record for zone (remove self from list).
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * callback to check:
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * If NXDOMAIN -> log error.
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * If NODATA -> log error.
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * If referral -> log error.
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * If no-auth -> log error.
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington * Compare SOA serial with ixfr list and if older that 3x refresh
8f66dad9393ae0724f758c4a51e06ff55c2d1219Brian Wellington checkservers = isc_mem_get(zone->mctx, sizeof *checkservers);
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson dns_zone_attach(zone, &checkservers->zone);
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt dns_resolver_attach(zone->res, &checkservers->res);
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson checkservers->magic = CHECKSERVERS_MAGIC;
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson ISC_LIST_APPEND(zone->checkservers, checkservers, link);
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson dns_resolver_createfetch(zone->res, zonename, dns_rdatatype_ns,
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafssoncheckservers_callback(isc_task_t *task, isc_event_t *event) {
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson const char me[] = "checkservers_callback";
e851ea826066ac5a5b01c2c23218faa0273a12e8Evan Hunt dns_fetchdoneevent_t *devent = (dns_fetchdoneevent_t *)event;
984ca288f1291c7b7bda9b3809a7af714e3ec82aAndreas Gustafsson dns_zone_checkservers_t *checkservers = event->arg;
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence REQUIRE(DNS_CHECKSERVERS_VALID(checkservers));
ff2add63ae297d3c0f925f7479aefc15fd9aec31David Lawrence "unable to obtain address for (%s)");
71ca6e64b4d208a090d255eb64c24f945e615ea0Brian Wellington "unable to obtain %s RRset from %s"
20bd7b4bbf2437ef2f9109edca168ab0ce8445b3David Lawrence add_address_tocheck(msg, checkservers, dns_rdatatype_a6);
11463c0ac24692e229ec87f307f5e7df3c0a7e10Evan Hunt dns_resolver_createfetch(res, name, dns_rdatatype_aaaa,
case get_a:
case get_ns:
case get_soa:
goto cleanup;
goto cleanup_msgsoa;
goto cleanup_msgsoa;
goto cleanup_msgsoa;
server);
goto cleanup_zonesoa;
goto cleanup_zonesoa;
server);
#ifdef notyet
switch (type) {
case dns_rdatatype_a:
dns_rdata_freestruct(&a);
case dns_rdatatype_a6:
INSIST(0);
if (free_now)
static isc_result_t
if (value)
if (value)
unsigned int *optionsmask)
goto cleanup;
goto cleanup;
return (DNS_R_SUCCESS);
return (DNS_R_NOMEMORY);
return (DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
goto cleanup;
return (DNS_R_SUCCESS);
return (DNS_R_NOMEMORY);
return (DNS_R_NOMEMORY);
return (DNS_R_SUCCESS);
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_master:
case dns_zone_slave:
case dns_zone_stub:
#ifdef notyet
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
#ifdef notyet
char *buf;
int buflen;
FILE *f;
return (result);
if (f == NULL) {
goto cleanup;
&dns_master_style_default, f);
n = fflush(f);
n = ferror(f);
n = fclose(f);
return (result);
return (result);
#ifdef notyet
static isc_result_t
(void)tmgr;
return (DNS_R_SUCCESS);
return (DNS_R_UNEXPECTED);
return (DNS_R_UNEXPECTED);
isc_socket_t *s;
== ISC_R_SUCCESS);
s = NULL;
return (result);
isc_socket_detach(&s);
return (DNS_R_SUCCESS);
goto cleanup1;
goto cleanup2;
#ifdef notyet
char *master;
&masterbuf);
goto next_master;
goto next_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;
#ifdef notyet
static isc_result_t
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
if (next == 0) {
return (DNS_R_UNEXPECTED);
return (DNS_R_SUCCESS);
static isc_result_t
return (result);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
return (DNS_R_FORMERR);
return (DNS_R_NOTIMP);
return (DNS_R_SUCCESS);
return (DNS_R_REFUSED);
&rdataset);
return (DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
const char *fmt, ...) {
int len;
#ifdef notyet
int res = 0;
res++;
return (res);
if (idlein == 0)
if (idleout == 0)
#ifdef notyet
record_serial() {
return (ISC_FALSE);
return (result);
static isc_result_t
goto fail;
if (dump) {
goto fail;
return (DNS_R_SUCCESS);
fail:
return (result);
switch (result) {
case DNS_R_UPTODATE:
case DNS_R_SUCCESS:
if (again)
if (port == 0)
return (ISC_R_NOMEMORY);
goto free_mem;
goto free_rwlock;
goto free_conflock;
goto free_transfersin;
goto free_taskpool;
return (ISC_R_SUCCESS);
return (result);
goto cleanup_task;
goto unlock;
return (result);
dns_zone_t *p;
p != NULL;
return (ISC_R_SUCCESS);