summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib')
-rw-r--r--usr.sbin/bind/lib/dns/adb.c273
-rw-r--r--usr.sbin/bind/lib/dns/api2
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/dispatch.h9
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/zone.h6
-rw-r--r--usr.sbin/bind/lib/dns/resolver.c51
-rw-r--r--usr.sbin/bind/lib/dns/sec/dst/openssl_link.c20
-rw-r--r--usr.sbin/bind/lib/dns/zone.c6
-rw-r--r--usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c20
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c14
-rw-r--r--usr.sbin/bind/lib/isc/win32/net.c12
-rw-r--r--usr.sbin/bind/lib/isccfg/api2
-rw-r--r--usr.sbin/bind/lib/isccfg/parser.c9
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_buffer.html39
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_config.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_context.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gabn.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gethostent.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getipnode.32
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook6
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getipnode.html6
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_gnba.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_hstrerror.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_inetntop.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_noop.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_packet.html4
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_resutil.html4
31 files changed, 328 insertions, 209 deletions
diff --git a/usr.sbin/bind/lib/dns/adb.c b/usr.sbin/bind/lib/dns/adb.c
index 765db821d2d..72f54871c67 100644
--- a/usr.sbin/bind/lib/dns/adb.c
+++ b/usr.sbin/bind/lib/dns/adb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: adb.c,v 1.181.2.4 2002/08/05 06:57:11 marka Exp $ */
+/* $ISC: adb.c,v 1.181.2.4.4.2 2003/02/17 07:05:07 marka Exp $ */
/*
* Implementation notes
@@ -279,7 +279,7 @@ static inline void free_adbzoneinfo(dns_adb_t *, dns_adbzoneinfo_t **);
static inline dns_adbentry_t *new_adbentry(dns_adb_t *);
static inline void free_adbentry(dns_adb_t *, dns_adbentry_t **);
static inline dns_adbfind_t *new_adbfind(dns_adb_t *);
-static inline void free_adbfind(dns_adb_t *, dns_adbfind_t **);
+static inline isc_boolean_t free_adbfind(dns_adb_t *, dns_adbfind_t **);
static inline dns_adbaddrinfo_t *new_adbaddrinfo(dns_adb_t *, dns_adbentry_t *,
in_port_t);
static inline dns_adbfetch_t *new_adbfetch(dns_adb_t *);
@@ -298,18 +298,18 @@ static void print_namehook_list(FILE *, const char *legend,
isc_boolean_t debug);
static void print_find_list(FILE *, dns_adbname_t *);
static void print_fetch_list(FILE *, dns_adbname_t *);
-static inline void dec_adb_irefcnt(dns_adb_t *);
+static inline isc_boolean_t dec_adb_irefcnt(dns_adb_t *);
static inline void inc_adb_erefcnt(dns_adb_t *);
static inline void inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
isc_boolean_t);
-static inline void dec_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
+static inline isc_boolean_t dec_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
isc_boolean_t);
static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
-static void clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
+static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
static void clean_target(dns_adb_t *, dns_name_t *);
static void clean_finds_at_name(dns_adbname_t *, isc_eventtype_t,
unsigned int);
-static void check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
+static isc_boolean_t check_expire_namehooks(dns_adbname_t *, isc_stdtime_t);
static void cancel_fetches_at_name(dns_adbname_t *);
static isc_result_t dbfind_name(dns_adbname_t *, isc_stdtime_t,
dns_rdatatype_t);
@@ -319,13 +319,13 @@ static isc_result_t fetch_name_a6(dns_adbname_t *, isc_boolean_t);
static inline void check_exit(dns_adb_t *);
static void timer_cleanup(isc_task_t *, isc_event_t *);
static void destroy(dns_adb_t *);
-static void shutdown_names(dns_adb_t *);
-static void shutdown_entries(dns_adb_t *);
+static isc_boolean_t shutdown_names(dns_adb_t *);
+static isc_boolean_t shutdown_entries(dns_adb_t *);
static inline void link_name(dns_adb_t *, int, dns_adbname_t *);
-static inline void unlink_name(dns_adb_t *, dns_adbname_t *);
+static inline isc_boolean_t unlink_name(dns_adb_t *, dns_adbname_t *);
static inline void link_entry(dns_adb_t *, int, dns_adbentry_t *);
-static inline void unlink_entry(dns_adb_t *, dns_adbentry_t *);
-static void kill_name(dns_adbname_t **, isc_eventtype_t);
+static inline isc_boolean_t unlink_entry(dns_adb_t *, dns_adbentry_t *);
+static isc_boolean_t kill_name(dns_adbname_t **, isc_eventtype_t);
static void fetch_callback_a6(isc_task_t *, isc_event_t *);
static isc_result_t dbfind_a6(dns_adbname_t *, isc_stdtime_t);
@@ -671,9 +671,11 @@ import_a6(dns_a6context_t *a6ctx) {
/*
* Requires the name's bucket be locked.
*/
-static void
+static isc_boolean_t
kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
dns_adbname_t *name;
+ isc_boolean_t result = ISC_FALSE;
+ isc_boolean_t result4, result6;
dns_adb_t *adb;
INSIST(n != NULL);
@@ -690,9 +692,11 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
* away now or not.
*/
if (NAME_DEAD(name) && !NAME_FETCH(name)) {
- unlink_name(adb, name);
+ result = unlink_name(adb, name);
free_adbname(adb, &name);
- return;
+ if (result)
+ result = dec_adb_irefcnt(adb);
+ return (result);
}
/*
@@ -700,29 +704,36 @@ kill_name(dns_adbname_t **n, isc_eventtype_t ev) {
* in that they will always empty the list.
*/
clean_finds_at_name(name, ev, DNS_ADBFIND_ADDRESSMASK);
- clean_namehooks(adb, &name->v4);
- clean_namehooks(adb, &name->v6);
+ result4 = clean_namehooks(adb, &name->v4);
+ result6 = clean_namehooks(adb, &name->v6);
clean_target(adb, &name->target);
+ result = ISC_TF(result4 || result6);
/*
* If fetches are running, cancel them. If none are running, we can
* just kill the name here.
*/
if (!NAME_FETCH(name)) {
- unlink_name(adb, name);
+ INSIST(result == ISC_FALSE);
+ result = unlink_name(adb, name);
free_adbname(adb, &name);
+ if (result)
+ result = dec_adb_irefcnt(adb);
} else {
name->flags |= NAME_IS_DEAD;
cancel_fetches_at_name(name);
}
+ return (result);
}
/*
* Requires the name's bucket be locked and no entry buckets be locked.
*/
-static void
+static isc_boolean_t
check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
dns_adb_t *adb;
+ isc_boolean_t result4 = ISC_FALSE;
+ isc_boolean_t result6 = ISC_FALSE;
INSIST(DNS_ADBNAME_VALID(name));
adb = name->adb;
@@ -734,7 +745,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
if (!NAME_FETCH_V4(name) && EXPIRE_OK(name->expire_v4, now)) {
if (NAME_HAS_V4(name)) {
DP(DEF_LEVEL, "expiring v4 for name %p", name);
- clean_namehooks(adb, &name->v4);
+ result4 = clean_namehooks(adb, &name->v4);
name->partial_result &= ~DNS_ADBFIND_INET;
}
name->expire_v4 = INT_MAX;
@@ -746,7 +757,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
if (!NAME_FETCH_V6(name) && EXPIRE_OK(name->expire_v6, now)) {
if (NAME_HAS_V6(name)) {
DP(DEF_LEVEL, "expiring v6 for name %p", name);
- clean_namehooks(adb, &name->v6);
+ result6 = clean_namehooks(adb, &name->v6);
name->partial_result &= ~DNS_ADBFIND_INET6;
}
name->expire_v6 = INT_MAX;
@@ -759,6 +770,7 @@ check_expire_namehooks(dns_adbname_t *name, isc_stdtime_t now) {
clean_target(adb, &name->target);
name->expire_target = INT_MAX;
}
+ return (ISC_TF(result4 || result6));
}
/*
@@ -776,9 +788,10 @@ link_name(dns_adb_t *adb, int bucket, dns_adbname_t *name) {
/*
* Requires the name's bucket be locked.
*/
-static inline void
+static inline isc_boolean_t
unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
int bucket;
+ isc_boolean_t result = ISC_FALSE;
bucket = name->lock_bucket;
INSIST(bucket != DNS_ADB_INVALIDBUCKET);
@@ -788,7 +801,8 @@ unlink_name(dns_adb_t *adb, dns_adbname_t *name) {
INSIST(adb->name_refcnt[bucket] > 0);
adb->name_refcnt[bucket]--;
if (adb->name_sd[bucket] && adb->name_refcnt[bucket] == 0)
- dec_adb_irefcnt(adb);
+ result = ISC_TRUE;
+ return (result);
}
/*
@@ -804,9 +818,10 @@ link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) {
/*
* Requires the entry's bucket be locked.
*/
-static inline void
+static inline isc_boolean_t
unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
int bucket;
+ isc_boolean_t result = ISC_FALSE;
bucket = entry->lock_bucket;
INSIST(bucket != DNS_ADB_INVALIDBUCKET);
@@ -816,7 +831,8 @@ unlink_entry(dns_adb_t *adb, dns_adbentry_t *entry) {
INSIST(adb->entry_refcnt[bucket] > 0);
adb->entry_refcnt[bucket]--;
if (adb->entry_sd[bucket] && adb->entry_refcnt[bucket] == 0)
- dec_adb_irefcnt(adb);
+ result = ISC_TRUE;
+ return (result);
}
static inline void
@@ -832,9 +848,10 @@ violate_locking_hierarchy(isc_mutex_t *have, isc_mutex_t *want) {
* The ADB _MUST_ be locked before calling. Also, exit conditions must be
* checked after calling this function.
*/
-static void
+static isc_boolean_t
shutdown_names(dns_adb_t *adb) {
int bucket;
+ isc_boolean_t result = ISC_FALSE;
dns_adbname_t *name;
dns_adbname_t *next_name;
@@ -849,7 +866,8 @@ shutdown_names(dns_adb_t *adb) {
* irefcnt ourselves, since it will not be
* automatically triggered by a name being unlinked.
*/
- dec_adb_irefcnt(adb);
+ INSIST(result == ISC_FALSE);
+ result = dec_adb_irefcnt(adb);
} else {
/*
* Run through the list. For each name, clean up finds
@@ -859,22 +877,26 @@ shutdown_names(dns_adb_t *adb) {
*/
while (name != NULL) {
next_name = ISC_LIST_NEXT(name, plink);
- kill_name(&name, DNS_EVENT_ADBSHUTDOWN);
+ INSIST(result == ISC_FALSE);
+ result = kill_name(&name,
+ DNS_EVENT_ADBSHUTDOWN);
name = next_name;
}
}
UNLOCK(&adb->namelocks[bucket]);
}
+ return (result);
}
/*
* The ADB _MUST_ be locked before calling. Also, exit conditions must be
* checked after calling this function.
*/
-static void
+static isc_boolean_t
shutdown_entries(dns_adb_t *adb) {
int bucket;
+ isc_boolean_t result = ISC_FALSE;
dns_adbentry_t *entry;
dns_adbentry_t *next_entry;
@@ -889,7 +911,7 @@ shutdown_entries(dns_adb_t *adb) {
* irefcnt ourselves, since it will not be
* automatically triggered by an entry being unlinked.
*/
- dec_adb_irefcnt(adb);
+ result = dec_adb_irefcnt(adb);
} else {
/*
* Run through the list. Cleanup any entries not
@@ -899,8 +921,10 @@ shutdown_entries(dns_adb_t *adb) {
next_entry = ISC_LIST_NEXT(entry, plink);
if (entry->refcnt == 0 &&
entry->expires != 0) {
- unlink_entry(adb, entry);
+ result = unlink_entry(adb, entry);
free_adbentry(adb, &entry);
+ if (result)
+ result = dec_adb_irefcnt(adb);
}
entry = next_entry;
}
@@ -908,6 +932,7 @@ shutdown_entries(dns_adb_t *adb) {
UNLOCK(&adb->entrylocks[bucket]);
}
+ return (result);
}
/*
@@ -935,11 +960,12 @@ cancel_fetches_at_name(dns_adbname_t *name) {
/*
* Assumes the name bucket is locked.
*/
-static void
+static isc_boolean_t
clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
dns_adbentry_t *entry;
dns_adbnamehook_t *namehook;
int addr_bucket;
+ isc_boolean_t result = ISC_FALSE;
addr_bucket = DNS_ADB_INVALIDBUCKET;
namehook = ISC_LIST_HEAD(*namehooks);
@@ -960,7 +986,7 @@ clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
LOCK(&adb->entrylocks[addr_bucket]);
}
- dec_entry_refcnt(adb, entry, ISC_FALSE);
+ result = dec_entry_refcnt(adb, entry, ISC_FALSE);
}
/*
@@ -975,6 +1001,7 @@ clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
if (addr_bucket != DNS_ADB_INVALIDBUCKET)
UNLOCK(&adb->entrylocks[addr_bucket]);
+ return (result);
}
static void
@@ -1163,23 +1190,33 @@ clean_finds_at_name(dns_adbname_t *name, isc_eventtype_t evtype,
static inline void
check_exit(dns_adb_t *adb) {
isc_event_t *event;
- isc_task_t *etask;
- isc_boolean_t zeroirefcnt, zeroerefcnt;
-
/*
* The caller must be holding the adb lock.
*/
+ if (adb->shutting_down) {
+ /*
+ * If there aren't any external references either, we're
+ * done. Send the control event to initiate shutdown.
+ */
+ INSIST(!adb->cevent_sent); /* Sanity check. */
+ event = &adb->cevent;
+ isc_task_send(adb->task, &event);
+ adb->cevent_sent = ISC_TRUE;
+ }
+}
+
+static inline isc_boolean_t
+dec_adb_irefcnt(dns_adb_t *adb) {
+ isc_event_t *event;
+ isc_task_t *etask;
+ isc_boolean_t result = ISC_FALSE;
LOCK(&adb->reflock);
- zeroirefcnt = ISC_TF(adb->irefcnt == 0);
- zeroerefcnt = ISC_TF(adb->erefcnt == 0);
- UNLOCK(&adb->reflock);
- if (adb->shutting_down && zeroirefcnt &&
- isc_mempool_getallocated(adb->ahmp) == 0) {
- /*
- * We're now shutdown. Send any whenshutdown events.
- */
+ INSIST(adb->irefcnt > 0);
+ adb->irefcnt--;
+
+ if (adb->irefcnt == 0) {
event = ISC_LIST_HEAD(adb->whenshutdown);
while (event != NULL) {
ISC_LIST_UNLINK(adb->whenshutdown, event, ev_link);
@@ -1188,27 +1225,18 @@ check_exit(dns_adb_t *adb) {
isc_task_sendanddetach(&etask, &event);
event = ISC_LIST_HEAD(adb->whenshutdown);
}
-
- /*
- * If there aren't any external references either, we're
- * done. Send the control event to initiate shutdown.
- */
- if (zeroerefcnt) {
- INSIST(!adb->cevent_sent); /* Sanity check. */
- event = &adb->cevent;
- isc_task_send(adb->task, &event);
- adb->cevent_sent = ISC_TRUE;
- }
}
+
+ if (adb->irefcnt == 0 && adb->erefcnt == 0)
+ result = ISC_TRUE;
+ UNLOCK(&adb->reflock);
+ return (result);
}
static inline void
-dec_adb_irefcnt(dns_adb_t *adb) {
+inc_adb_irefcnt(dns_adb_t *adb) {
LOCK(&adb->reflock);
-
- INSIST(adb->irefcnt > 0);
- adb->irefcnt--;
-
+ adb->irefcnt++;
UNLOCK(&adb->reflock);
}
@@ -1234,10 +1262,11 @@ inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
UNLOCK(&adb->entrylocks[bucket]);
}
-static inline void
+static inline isc_boolean_t
dec_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
int bucket;
isc_boolean_t destroy_entry;
+ isc_boolean_t result = ISC_FALSE;
bucket = entry->lock_bucket;
@@ -1251,18 +1280,22 @@ dec_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
if (entry->refcnt == 0 &&
(adb->entry_sd[bucket] || entry->expires == 0)) {
destroy_entry = ISC_TRUE;
- unlink_entry(adb, entry);
+ result = unlink_entry(adb, entry);
}
if (lock)
UNLOCK(&adb->entrylocks[bucket]);
if (!destroy_entry)
- return;
+ return (result);
entry->lock_bucket = DNS_ADB_INVALIDBUCKET;
free_adbentry(adb, &entry);
+ if (result)
+ result =dec_adb_irefcnt(adb);
+
+ return (result);
}
static inline dns_adbname_t *
@@ -1477,6 +1510,7 @@ new_adbfind(dns_adb_t *adb) {
ISC_EVENT_INIT(&h->event, sizeof (isc_event_t), 0, 0, 0, NULL, NULL,
NULL, NULL, h);
+ inc_adb_irefcnt(adb);
h->magic = DNS_ADBFIND_MAGIC;
return (h);
}
@@ -1666,7 +1700,7 @@ free_adbfetch6(dns_adb_t *adb, dns_adbfetch6_t **fetch) {
isc_mempool_put(adb->af6mp, f);
}
-static inline void
+static inline isc_boolean_t
free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) {
dns_adbfind_t *find;
@@ -1684,6 +1718,7 @@ free_adbfind(dns_adb_t *adb, dns_adbfind_t **findp) {
DESTROYLOCK(&find->lock);
isc_mempool_put(adb->ahmp, find);
+ return (dec_adb_irefcnt(adb));
}
/*
@@ -1939,94 +1974,105 @@ shutdown_task(isc_task_t *task, isc_event_t *ev) {
/*
* name bucket must be locked; adb may be locked; no other locks held.
*/
-static void
+static isc_boolean_t
check_expire_name(dns_adbname_t **namep, isc_stdtime_t now) {
dns_adbname_t *name;
+ isc_result_t result = ISC_FALSE;
INSIST(namep != NULL && DNS_ADBNAME_VALID(*namep));
name = *namep;
if (NAME_HAS_V4(name) || NAME_HAS_V6(name))
- return;
+ return (result);
if (NAME_FETCH(name))
- return;
+ return (result);
if (!EXPIRE_OK(name->expire_v4, now))
- return;
+ return (result);
if (!EXPIRE_OK(name->expire_v6, now))
- return;
+ return (result);
if (!EXPIRE_OK(name->expire_target, now))
- return;
+ return (result);
/*
* The name is empty. Delete it.
*/
- kill_name(&name, DNS_EVENT_ADBEXPIRED);
+ result = kill_name(&name, DNS_EVENT_ADBEXPIRED);
*namep = NULL;
/*
* Our caller, or one of its callers, will be calling check_exit() at
* some point, so we don't need to do it here.
*/
+ return (result);
}
/*
* entry bucket must be locked; adb may be locked; no other locks held.
*/
-static void
+static isc_boolean_t
check_expire_entry(dns_adb_t *adb, dns_adbentry_t **entryp, isc_stdtime_t now)
{
dns_adbentry_t *entry;
+ isc_boolean_t result = ISC_FALSE;
INSIST(entryp != NULL && DNS_ADBENTRY_VALID(*entryp));
entry = *entryp;
if (entry->refcnt != 0)
- return;
+ return (result);
if (entry->expires == 0 || entry->expires > now)
- return;
+ return (result);
/*
* The entry is not in use. Delete it.
*/
DP(DEF_LEVEL, "killing entry %p", entry);
INSIST(ISC_LINK_LINKED(entry, plink));
- unlink_entry(adb, entry);
+ result = unlink_entry(adb, entry);
free_adbentry(adb, &entry);
+ if (result)
+ dec_adb_irefcnt(adb);
*entryp = NULL;
+ return (result);
}
/*
* ADB must be locked, and no other locks held.
*/
-static void
+static isc_boolean_t
cleanup_names(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
dns_adbname_t *name;
dns_adbname_t *next_name;
+ isc_result_t result = ISC_FALSE;
DP(CLEAN_LEVEL, "cleaning name bucket %d", bucket);
LOCK(&adb->namelocks[bucket]);
if (adb->name_sd[bucket]) {
UNLOCK(&adb->namelocks[bucket]);
- return;
+ return (result);
}
name = ISC_LIST_HEAD(adb->names[bucket]);
while (name != NULL) {
next_name = ISC_LIST_NEXT(name, plink);
- check_expire_namehooks(name, now);
- check_expire_name(&name, now);
+ INSIST(result == ISC_FALSE);
+ result = check_expire_namehooks(name, now);
+ if (!result)
+ result = check_expire_name(&name, now);
name = next_name;
}
UNLOCK(&adb->namelocks[bucket]);
+ return (result);
}
/*
* ADB must be locked, and no other locks held.
*/
-static void
+static isc_boolean_t
cleanup_entries(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
dns_adbentry_t *entry, *next_entry;
+ isc_boolean_t result = ISC_FALSE;
DP(CLEAN_LEVEL, "cleaning entry bucket %d", bucket);
@@ -2034,10 +2080,12 @@ cleanup_entries(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
entry = ISC_LIST_HEAD(adb->entries[bucket]);
while (entry != NULL) {
next_entry = ISC_LIST_NEXT(entry, plink);
- check_expire_entry(adb, &entry, now);
+ INSIST(result == ISC_FALSE);
+ result = check_expire_entry(adb, &entry, now);
entry = next_entry;
}
UNLOCK(&adb->entrylocks[bucket]);
+ return (result);
}
static void
@@ -2059,8 +2107,10 @@ timer_cleanup(isc_task_t *task, isc_event_t *ev) {
/*
* Call our cleanup routines.
*/
- cleanup_names(adb, adb->next_cleanbucket, now);
- cleanup_entries(adb, adb->next_cleanbucket, now);
+ INSIST(cleanup_names(adb, adb->next_cleanbucket, now) ==
+ ISC_FALSE);
+ INSIST(cleanup_entries(adb, adb->next_cleanbucket, now) ==
+ ISC_FALSE);
/*
* Set the next bucket to be cleaned.
@@ -2310,7 +2360,7 @@ dns_adb_attach(dns_adb_t *adb, dns_adb_t **adbx) {
void
dns_adb_detach(dns_adb_t **adbx) {
dns_adb_t *adb;
- isc_boolean_t zeroerefcnt;
+ isc_boolean_t need_exit_check;
REQUIRE(adbx != NULL && DNS_ADB_VALID(*adbx));
@@ -2321,13 +2371,13 @@ dns_adb_detach(dns_adb_t **adbx) {
LOCK(&adb->reflock);
adb->erefcnt--;
- zeroerefcnt = ISC_TF(adb->erefcnt == 0);
+ need_exit_check = ISC_TF(adb->erefcnt == 0 && adb->irefcnt == 0);
UNLOCK(&adb->reflock);
- if (zeroerefcnt) {
+ if (need_exit_check) {
LOCK(&adb->lock);
- check_exit(adb);
INSIST(adb->shutting_down);
+ check_exit(adb);
UNLOCK(&adb->lock);
}
}
@@ -2352,7 +2402,6 @@ dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp) {
LOCK(&adb->reflock);
zeroirefcnt = ISC_TF(adb->irefcnt == 0);
- UNLOCK(&adb->reflock);
if (adb->shutting_down && zeroirefcnt &&
isc_mempool_getallocated(adb->ahmp) == 0) {
@@ -2368,11 +2417,13 @@ dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp) {
ISC_LIST_APPEND(adb->whenshutdown, event, ev_link);
}
+ UNLOCK(&adb->reflock);
UNLOCK(&adb->lock);
}
void
dns_adb_shutdown(dns_adb_t *adb) {
+ isc_boolean_t need_check_exit;
/*
* Shutdown 'adb'.
@@ -2382,9 +2433,11 @@ dns_adb_shutdown(dns_adb_t *adb) {
if (!adb->shutting_down) {
adb->shutting_down = ISC_TRUE;
- shutdown_names(adb);
- shutdown_entries(adb);
- check_exit(adb);
+ need_check_exit = shutdown_names(adb);
+ if (!need_check_exit)
+ need_check_exit = shutdown_entries(adb);
+ if (need_check_exit)
+ check_exit(adb);
}
UNLOCK(&adb->lock);
@@ -2471,7 +2524,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
if (adb->name_sd[bucket]) {
DP(DEF_LEVEL,
"dns_adb_createfind: returning ISC_R_SHUTTINGDOWN");
- free_adbfind(adb, &find);
+ INSIST(free_adbfind(adb, &find) == ISC_FALSE);
result = ISC_R_SHUTTINGDOWN;
goto out;
}
@@ -2482,7 +2535,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
if (adbname == NULL) {
adbname = new_adbname(adb, name);
if (adbname == NULL) {
- free_adbfind(adb, &find);
+ INSIST(free_adbfind(adb, &find) == ISC_FALSE);
result = ISC_R_NOMEMORY;
goto out;
}
@@ -2498,7 +2551,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
/*
* Expire old entries, etc.
*/
- check_expire_namehooks(adbname, now);
+ INSIST(check_expire_namehooks(adbname, now) == ISC_FALSE);
/*
* Do we know that the name is an alias?
@@ -2781,7 +2834,7 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
entry = ai->entry;
ai->entry = NULL;
INSIST(DNS_ADBENTRY_VALID(entry));
- dec_entry_refcnt(adb, entry, ISC_TRUE);
+ INSIST(dec_entry_refcnt(adb, entry, ISC_TRUE) == ISC_FALSE);
free_adbaddrinfo(adb, &ai);
ai = ISC_LIST_HEAD(find->list);
}
@@ -2794,8 +2847,8 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
* lock is destroyed.
*/
LOCK(&adb->lock);
- free_adbfind(adb, &find);
- check_exit(adb);
+ if (free_adbfind(adb, &find))
+ check_exit(adb);
UNLOCK(&adb->lock);
}
@@ -3381,14 +3434,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
free_adbfetch(adb, &fetch);
isc_event_free(&ev);
- kill_name(&name, DNS_EVENT_ADBCANCELED);
-
- /*
- * If we're shutting down and this bucket is empty, we need
- * to call check_exit() to see if we're done.
- */
- if (adb->name_sd[bucket] && adb->name_refcnt[bucket] == 0)
- want_check_exit = ISC_TRUE;
+ want_check_exit = kill_name(&name, DNS_EVENT_ADBCANCELED);
UNLOCK(&adb->namelocks[bucket]);
@@ -3545,14 +3591,7 @@ fetch_callback_a6(isc_task_t *task, isc_event_t *ev) {
free_adbfetch6(adb, &fetch);
isc_event_free(&ev);
- kill_name(&name, DNS_EVENT_ADBCANCELED);
-
- /*
- * If we're shutting down and this bucket is empty, we need
- * to call check_exit() to see if we're done.
- */
- if (adb->name_sd[bucket] && adb->name_refcnt[bucket] == 0)
- want_check_exit = ISC_TRUE;
+ want_check_exit = kill_name(&name, DNS_EVENT_ADBCANCELED);
UNLOCK(&adb->namelocks[bucket]);
@@ -4007,9 +4046,7 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
entry->expires = now + 1800; /* XXXRTH */
- dec_entry_refcnt(adb, entry, ISC_FALSE);
- if (adb->entry_sd[bucket] && adb->entry_refcnt[bucket] == 0)
- want_check_exit = ISC_TRUE;
+ want_check_exit = dec_entry_refcnt(adb, entry, ISC_FALSE);
UNLOCK(&adb->entrylocks[bucket]);
@@ -4035,8 +4072,8 @@ dns_adb_flush(dns_adb_t *adb) {
/*
* Call our cleanup routines.
*/
- cleanup_names(adb, i, INT_MAX);
- cleanup_entries(adb, i, INT_MAX);
+ INSIST(cleanup_names(adb, i, INT_MAX) == ISC_FALSE);
+ INSIST(cleanup_entries(adb, i, INT_MAX) == ISC_FALSE);
}
#ifdef DUMP_ADB_AFTER_CLEANING
diff --git a/usr.sbin/bind/lib/dns/api b/usr.sbin/bind/lib/dns/api
index 7ce3e0d471a..c5d85110dcb 100644
--- a/usr.sbin/bind/lib/dns/api
+++ b/usr.sbin/bind/lib/dns/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 8
-LIBREVISION = 0
+LIBREVISION = 1
LIBAGE = 0
diff --git a/usr.sbin/bind/lib/dns/include/dns/dispatch.h b/usr.sbin/bind/lib/dns/include/dns/dispatch.h
index 512655031fb..cbe3ab9908d 100644
--- a/usr.sbin/bind/lib/dns/include/dns/dispatch.h
+++ b/usr.sbin/bind/lib/dns/include/dns/dispatch.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: dispatch.h,v 1.45 2001/04/30 18:09:28 gson Exp $ */
+/* $ISC: dispatch.h,v 1.45.22.2 2003/02/17 07:05:10 marka Exp $ */
#ifndef DNS_DISPATCH_H
#define DNS_DISPATCH_H 1
@@ -391,6 +391,11 @@ dns_dispatch_changeattributes(dns_dispatch_t *disp,
*
* new = (old & ~mask) | (attributes & mask)
*
+ * This function has a side effect when DNS_DISPATCHATTR_NOLISTEN changes.
+ * When the flag becomes off, the dispatch will start receiving on the
+ * corresponding socket. When the flag becomes on, receive events on the
+ * corresponding socket will be canceled.
+ *
* Requires:
* disp is valid.
*
diff --git a/usr.sbin/bind/lib/dns/include/dns/zone.h b/usr.sbin/bind/lib/dns/include/dns/zone.h
index 551b976fe3c..110155014bd 100644
--- a/usr.sbin/bind/lib/dns/include/dns/zone.h
+++ b/usr.sbin/bind/lib/dns/include/dns/zone.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: zone.h,v 1.106.2.5 2002/07/11 05:44:08 marka Exp $ */
+/* $ISC: zone.h,v 1.106.2.5.4.2 2003/02/17 07:05:10 marka Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
@@ -215,7 +215,7 @@ isc_result_t
dns_zone_loadnew(dns_zone_t *zone);
/*
* Cause the database to be loaded from its backing store.
- * Confirm that the mimimum requirements for the zone type are
+ * Confirm that the minimum requirements for the zone type are
* met, otherwise DNS_R_BADZONE is returned.
*
* dns_zone_loadnew() only loads zones that are not yet loaded.
diff --git a/usr.sbin/bind/lib/dns/resolver.c b/usr.sbin/bind/lib/dns/resolver.c
index de107807d1c..54b00fedfc2 100644
--- a/usr.sbin/bind/lib/dns/resolver.c
+++ b/usr.sbin/bind/lib/dns/resolver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: resolver.c,v 1.218.2.12 2002/07/15 02:28:07 marka Exp $ */
+/* $ISC: resolver.c,v 1.218.2.12.4.4 2003/02/18 03:32:01 marka Exp $ */
#include <config.h>
@@ -646,7 +646,11 @@ fctx_addopt(dns_message_t *message) {
/*
* Set EXTENDED-RCODE, VERSION, and Z to 0, and the DO bit to 1.
*/
+#ifdef ISC_RFC2535
rdatalist->ttl = DNS_MESSAGEEXTFLAG_DO;
+#else
+ rdatalist->ttl = 0;
+#endif
/*
* No EDNS options.
@@ -3501,16 +3505,28 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
*
* Only one set of NS RRs is allowed.
*/
- if (ns_name != NULL && name != ns_name)
- return (DNS_R_FORMERR);
- ns_name = name;
+ if (rdataset->type ==
+ dns_rdatatype_ns) {
+ if (ns_name != NULL &&
+ name != ns_name)
+ return (DNS_R_FORMERR);
+ ns_name = name;
+ }
name->attributes |=
DNS_NAMEATTR_CACHE;
rdataset->attributes |=
DNS_RDATASETATTR_CACHE;
rdataset->trust = dns_trust_glue;
ns_rdataset = rdataset;
- } else if (type == dns_rdatatype_soa ||
+ }
+ }
+ for (rdataset = ISC_LIST_HEAD(name->list);
+ rdataset != NULL;
+ rdataset = ISC_LIST_NEXT(rdataset, link)) {
+ type = rdataset->type;
+ if (type == dns_rdatatype_sig)
+ type = rdataset->covers;
+ if (type == dns_rdatatype_soa ||
type == dns_rdatatype_nxt) {
/*
* SOA, SIG SOA, NXT, or SIG NXT.
@@ -3524,11 +3540,18 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
return (DNS_R_FORMERR);
soa_name = name;
}
- negative_response = ISC_TRUE;
- name->attributes |=
- DNS_NAMEATTR_NCACHE;
- rdataset->attributes |=
- DNS_RDATASETATTR_NCACHE;
+ if (ns_name == NULL) {
+ negative_response = ISC_TRUE;
+ name->attributes |=
+ DNS_NAMEATTR_NCACHE;
+ rdataset->attributes |=
+ DNS_RDATASETATTR_NCACHE;
+ } else {
+ name->attributes |=
+ DNS_NAMEATTR_CACHE;
+ rdataset->attributes |=
+ DNS_RDATASETATTR_CACHE;
+ }
if (aa)
rdataset->trust =
dns_trust_authauthority;
@@ -3846,8 +3869,8 @@ answer_response(fetchctx_t *fctx) {
for (rdataset = ISC_LIST_HEAD(name->list);
rdataset != NULL;
rdataset = ISC_LIST_NEXT(rdataset, link)) {
+ isc_boolean_t found_dname = ISC_FALSE;
found = ISC_FALSE;
- want_chaining = ISC_FALSE;
aflag = 0;
if (rdataset->type == dns_rdatatype_dname) {
/*
@@ -3874,6 +3897,8 @@ answer_response(fetchctx_t *fctx) {
want_chaining = ISC_FALSE;
} else if (result != ISC_R_SUCCESS)
return (result);
+ else
+ found_dname = ISC_TRUE;
} else if (rdataset->type == dns_rdatatype_sig
&& rdataset->covers ==
dns_rdatatype_dname) {
@@ -3919,7 +3944,7 @@ answer_response(fetchctx_t *fctx) {
/*
* DNAME chaining.
*/
- if (want_chaining) {
+ if (found_dname) {
/*
* Copy the the dname into the
* qname fixed name.
diff --git a/usr.sbin/bind/lib/dns/sec/dst/openssl_link.c b/usr.sbin/bind/lib/dns/sec/dst/openssl_link.c
index 56fb179ad95..5b3f35da53a 100644
--- a/usr.sbin/bind/lib/dns/sec/dst/openssl_link.c
+++ b/usr.sbin/bind/lib/dns/sec/dst/openssl_link.c
@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
- * $ISC: openssl_link.c,v 1.46 2001/07/31 03:45:04 marka Exp $
+ * $ISC: openssl_link.c,v 1.46.8.1 2003/02/18 06:24:45 marka Exp $
*/
#ifdef OPENSSL
@@ -38,7 +38,11 @@
#include <openssl/rand.h>
#include <openssl/crypto.h>
-#ifdef CRYPTO_LOCK_ENGINE
+#if defined(CRYPTO_LOCK_ENGINE) && (OPENSSL_VERSION_NUMBER < 0x00907000L)
+#define USE_ENGINE 1
+#endif
+
+#ifdef USE_ENGINE
#include <openssl/engine.h>
#endif
@@ -46,7 +50,7 @@ static RAND_METHOD *rm = NULL;
static isc_mutex_t *locks = NULL;
static int nlocks;
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
static ENGINE *e;
#endif
@@ -120,7 +124,7 @@ dst__openssl_init() {
rm->add = entropy_add;
rm->pseudorand = entropy_getpseudo;
rm->status = NULL;
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
e = ENGINE_new();
if (e == NULL) {
result = ISC_R_NOMEMORY;
@@ -133,7 +137,7 @@ dst__openssl_init() {
#endif
return (ISC_R_SUCCESS);
-#ifdef CRYPTO_LOCK_ENGINE
+#ifdef USE_ENGINE
cleanup_rm:
dst__mem_free(rm);
#endif
@@ -146,6 +150,12 @@ dst__openssl_init() {
void
dst__openssl_destroy() {
+#ifdef USE_ENGINE
+ if (e != NULL) {
+ ENGINE_free(e);
+ e = NULL;
+ }
+#endif
if (locks != NULL) {
RUNTIME_CHECK(isc_mutexblock_destroy(locks, nlocks) ==
ISC_R_SUCCESS);
diff --git a/usr.sbin/bind/lib/dns/zone.c b/usr.sbin/bind/lib/dns/zone.c
index 51859aadd44..7b4ad73274f 100644
--- a/usr.sbin/bind/lib/dns/zone.c
+++ b/usr.sbin/bind/lib/dns/zone.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: zone.c,v 1.333.2.13 2002/08/06 02:24:15 marka Exp $ */
+/* $ISC: zone.c,v 1.333.2.13.4.2 2003/02/17 07:05:08 marka Exp $ */
#include <config.h>
@@ -4781,7 +4781,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
}
if (result == ISC_R_SUCCESS && xfrresult == ISC_R_SUCCESS)
dns_zone_log(zone, ISC_LOG_INFO,
- "transfered serial %u", zone->serial);
+ "transferred serial %u", zone->serial);
break;
diff --git a/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c b/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
index b62e5e0a2dd..47ff6f4ef1e 100644
--- a/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
+++ b/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
@@ -15,12 +15,30 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: ifiter_ioctl.c,v 1.19.2.2 2001/12/12 00:16:47 marka Exp $ */
+/* $ISC: ifiter_ioctl.c,v 1.19.2.2.4.1 2003/02/19 04:32:41 marka Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
* See netintro(4).
*/
+#ifdef __hpux
+#undef SIOCGLIFCONF
+#undef lifc_len
+#undef lifc_buf
+#undef lifc_req
+#undef lifconf
+#undef SIOCGLIFADDR
+#undef SIOCGLIFFLAGS
+#undef SIOCGLIFDSTADDR
+#undef SIOCGLIFNETMASK
+#undef lifr_addr
+#undef lifr_name
+#undef lifr_dstaddr
+#undef lifr_flags
+#undef ss_family
+#undef lifreq
+#endif
+
#ifndef SIOCGLIFCONF
#define SIOCGLIFCONF SIOCGIFCONF
#define lifc_len ifc_len
diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c
index 6c7156ab6f6..301f1520297 100644
--- a/usr.sbin/bind/lib/isc/unix/socket.c
+++ b/usr.sbin/bind/lib/isc/unix/socket.c
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: socket.c,v 1.207.2.14 2002/07/11 04:04:26 marka Exp $ */
+/* $ISC: socket.c,v 1.207.2.14.4.2 2003/02/18 07:28:41 marka Exp $ */
#include <config.h>
@@ -338,7 +338,7 @@ wakeup_socket(isc_socketmgr_t *manager, int fd, int msg) {
* or writes.
*/
- INSIST(fd >= 0 && fd < FD_SETSIZE);
+ INSIST(fd >= 0 && fd < (int)FD_SETSIZE);
if (manager->fdstate[fd] == CLOSE_PENDING) {
manager->fdstate[fd] = CLOSED;
@@ -1153,7 +1153,7 @@ destroy(isc_socket_t **sockp) {
INSIST(ISC_LIST_EMPTY(sock->recv_list));
INSIST(ISC_LIST_EMPTY(sock->send_list));
INSIST(sock->connect_ev == NULL);
- REQUIRE(sock->fd >= 0 && sock->fd < FD_SETSIZE);
+ REQUIRE(sock->fd >= 0 && sock->fd < (int)FD_SETSIZE);
LOCK(&manager->lock);
@@ -1316,7 +1316,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
break;
}
- if (sock->fd >= FD_SETSIZE) {
+ if (sock->fd >= (int)FD_SETSIZE) {
(void)close(sock->fd);
isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
@@ -1795,7 +1795,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
sock->pf);
(void)close(fd);
goto soft_error;
- } else if (fd >= FD_SETSIZE) {
+ } else if (fd >= (int)FD_SETSIZE) {
isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
isc_msgcat, ISC_MSGSET_SOCKET,
@@ -2007,7 +2007,7 @@ process_fds(isc_socketmgr_t *manager, int maxfd,
isc_socket_t *sock;
isc_boolean_t unlock_sock;
- REQUIRE(maxfd <= FD_SETSIZE);
+ REQUIRE(maxfd <= (int)FD_SETSIZE);
/*
* Process read/writes on other fds here. Avoid locking
@@ -2366,7 +2366,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
(void)isc_condition_destroy(&manager->shutdown_ok);
#endif /* ISC_PLATFORM_USETHREADS */
- for (i = 0 ; i < FD_SETSIZE ; i++)
+ for (i = 0 ; i < (int)FD_SETSIZE ; i++)
if (manager->fdstate[i] == CLOSE_PENDING)
close(i);
diff --git a/usr.sbin/bind/lib/isc/win32/net.c b/usr.sbin/bind/lib/isc/win32/net.c
index e0aeb526153..061c0aee56c 100644
--- a/usr.sbin/bind/lib/isc/win32/net.c
+++ b/usr.sbin/bind/lib/isc/win32/net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: net.c,v 1.3 2001/07/09 21:06:12 gson Exp $ */
+/* $ISC: net.c,v 1.3.8.2 2003/02/17 07:05:10 marka Exp $ */
#include <config.h>
@@ -39,17 +39,15 @@ static isc_result_t ipv6_result = ISC_R_NOTFOUND;
static isc_result_t
try_proto(int domain) {
- int s;
+ SOCKET s;
isc_result_t result = ISC_R_SUCCESS;
s = socket(domain, SOCK_STREAM, 0);
- if (s == -1) {
+ if (s == INVALID_SOCKET) {
switch (WSAGetLastError()) {
case WSAEAFNOSUPPORT:
case WSAEPROTONOSUPPORT:
-#ifdef EINVAL
- case EINVAL:
-#endif
+ case WSAEINVAL:
return (ISC_R_NOTFOUND);
default:
UNEXPECTED_ERROR(__FILE__, __LINE__,
diff --git a/usr.sbin/bind/lib/isccfg/api b/usr.sbin/bind/lib/isccfg/api
index ae2943dd5bd..dbaaf58cca8 100644
--- a/usr.sbin/bind/lib/isccfg/api
+++ b/usr.sbin/bind/lib/isccfg/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 0
-LIBREVISION = 3
+LIBREVISION = 4
LIBAGE = 0
diff --git a/usr.sbin/bind/lib/isccfg/parser.c b/usr.sbin/bind/lib/isccfg/parser.c
index 1ba5f6f29c1..9bad2b1541d 100644
--- a/usr.sbin/bind/lib/isccfg/parser.c
+++ b/usr.sbin/bind/lib/isccfg/parser.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2002 Internet Software Consortium.
+ * Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: parser.c,v 1.70.2.14 2002/02/08 03:57:47 marka Exp $ */
+/* $ISC: parser.c,v 1.70.2.14.4.2 2003/02/17 07:05:10 marka Exp $ */
#include <config.h>
@@ -799,7 +799,12 @@ namedconf_or_view_clauses[] = {
{ "key", &cfg_type_key, CFG_CLAUSEFLAG_MULTI },
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
{ "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
+#ifdef ISC_RFC2535
{ "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI },
+#else
+ { "trusted-keys", &cfg_type_trustedkeys,
+ CFG_CLAUSEFLAG_MULTI|CFG_CLAUSEFLAG_OBSOLETE },
+#endif
{ NULL, NULL, 0 }
};
diff --git a/usr.sbin/bind/lib/lwres/man/lwres.html b/usr.sbin/bind/lib/lwres/man/lwres.html
index 7b9f88dcb11..27ebf97c1e5 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres.html
@@ -20,7 +20,7 @@
>lwres</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -441,4 +441,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_buffer.html b/usr.sbin/bind/lib/lwres/man/lwres_buffer.html
index ae2ffd50cc7..117dbc95e05 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_buffer.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_buffer.html
@@ -20,7 +20,7 @@
>lwres_buffer</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -210,13 +210,19 @@ functions in the ISC library.</P
><P
>A buffer is a region of memory, together with a set of related
subregions.
-The <I
+The <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>used region</I
+></SPAN
> and the
-<I
+<SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>available</I
+></SPAN
> region are disjoint, and
their union is the buffer's region.
The used region extends from the beginning of the buffer region to the
@@ -228,31 +234,46 @@ buffer commands.
Initially, the used region is empty.</P
><P
>The used region is further subdivided into two disjoint regions: the
-<I
+<SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>consumed region</I
-> and the <I
+></SPAN
+> and the <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>remaining region</I
+></SPAN
>.
The union of these two regions is the used region.
The consumed region extends from the beginning of the used region to
-the byte before the <I
+the byte before the <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>current</I
+></SPAN
> offset (if any).
-The <I
+The <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>remaining</I
+></SPAN
> region the current pointer to the end of the used
region.
The size of the consumed region can be changed using various
buffer commands.
Initially, the consumed region is empty.</P
><P
->The <I
+>The <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>active region</I
+></SPAN
> is an (optional) subregion of the remaining
region.
It extends from the current offset to an offset in the
@@ -605,4 +626,4 @@ CLASS="PARAMETER"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_config.html b/usr.sbin/bind/lib/lwres/man/lwres_config.html
index 67fbcdd8837..3c80c9e6389 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_config.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_config.html
@@ -20,7 +20,7 @@
>lwres_config</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -292,4 +292,4 @@ CLASS="FILENAME"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_context.html b/usr.sbin/bind/lib/lwres/man/lwres_context.html
index 377125c434a..90a969fd325 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_context.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_context.html
@@ -20,7 +20,7 @@
>lwres_context</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -516,4 +516,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gabn.html b/usr.sbin/bind/lib/lwres/man/lwres_gabn.html
index 5611cac6ce6..f6aab797b3f 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gabn.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gabn.html
@@ -20,7 +20,7 @@
>lwres_gabn</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -439,4 +439,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.html b/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.html
index 7f245ba4e83..4cab1e324f6 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gai_strerror.html
@@ -20,7 +20,7 @@
>lwres_gai_strerror</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -291,4 +291,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.html b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.html
index d04ecc1a2f8..34b83cf1ce4 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getaddrinfo.html
@@ -20,7 +20,7 @@
>lwres_getaddrinfo</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -719,4 +719,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.html b/usr.sbin/bind/lib/lwres/man/lwres_gethostent.html
index 28671b86b9b..615e348eab4 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gethostent.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gethostent.html
@@ -20,7 +20,7 @@
>lwres_gethostent</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -824,4 +824,4 @@ consequently the above functions don't, either.</P
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.3 b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.3
index c25c1a5d098..6cc2dd95667 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.3
@@ -153,7 +153,7 @@ and
\fBlwres_getipnodebyaddr()\fR
set
\fI*error_num\fR
-to an approriate error code and the function returns a
+to an appropriate error code and the function returns a
\fBNULL\fR
pointer.
The error codes and their meanings are defined in
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
index 2438ae3a4ce..f867e026b58 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $ISC: lwres_getipnode.docbook,v 1.4 2001/06/18 22:06:55 gson Exp $ -->
+<!-- $ISC: lwres_getipnode.docbook,v 1.4.118.2 2003/02/17 07:05:11 marka Exp $ -->
<refentry>
@@ -231,7 +231,7 @@ and
<function>lwres_getipnodebyaddr()</function>
set
<parameter>*error_num</parameter>
-to an approriate error code and the function returns a
+to an appropriate error code and the function returns a
<type>NULL</type>
pointer.
The error codes and their meanings are defined in
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.html b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.html
index d0a71e69d9a..35aa761f865 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.html
@@ -20,7 +20,7 @@
>lwres_getipnode</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -398,7 +398,7 @@ CLASS="PARAMETER"
>*error_num</I
></TT
>
-to an approriate error code and the function returns a
+to an appropriate error code and the function returns a
<SPAN
CLASS="TYPE"
>NULL</SPAN
@@ -526,4 +526,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.html b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.html
index b98a928483f..dda3cc3ecf3 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getnameinfo.html
@@ -20,7 +20,7 @@
>lwres_getnameinfo</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -300,4 +300,4 @@ are.</P
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.html b/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.html
index 3e5ab615c23..40d408159ea 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getrrsetbyname.html
@@ -20,7 +20,7 @@
>lwres_getrrsetbyname</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -368,4 +368,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_gnba.html b/usr.sbin/bind/lib/lwres/man/lwres_gnba.html
index 98cc04dd654..b89bfb99dd3 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_gnba.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_gnba.html
@@ -20,7 +20,7 @@
>lwres_gnba</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -405,4 +405,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.html b/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.html
index 128b7e4f821..dd93852c79c 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_hstrerror.html
@@ -20,7 +20,7 @@
>lwres_hstrerror</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -239,4 +239,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.html b/usr.sbin/bind/lib/lwres/man/lwres_inetntop.html
index 09d4fea34c7..54c18229a25 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_inetntop.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_inetntop.html
@@ -20,7 +20,7 @@
>lwres_inetntop</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -183,4 +183,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_noop.html b/usr.sbin/bind/lib/lwres/man/lwres_noop.html
index fdb5da103ff..c27dea41210 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_noop.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_noop.html
@@ -20,7 +20,7 @@
>lwres_noop</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -406,4 +406,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_packet.html b/usr.sbin/bind/lib/lwres/man/lwres_packet.html
index 5c5828f4981..0e4ebe773c6 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_packet.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_packet.html
@@ -20,7 +20,7 @@
>lwres_packet</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -370,4 +370,4 @@ CLASS="ERRORCODE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_resutil.html b/usr.sbin/bind/lib/lwres/man/lwres_resutil.html
index ae3a2f64633..cdb64d47415 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_resutil.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_resutil.html
@@ -20,7 +20,7 @@
>lwres_resutil</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -409,4 +409,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>