diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:14:43 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:14:43 -0600 |
commit | c83e70048513fc5611b7e0cd69bda040d3355bc2 (patch) | |
tree | 31d241dd8b95d328bd8032a75e213ad094817cbd | |
parent | 94465e63cbfb35aed26ac350f7b55fcbbd88eb7b (diff) | |
download | bind9-c83e70048513fc5611b7e0cd69bda040d3355bc2.tar.gz |
9.2.4rc3
37 files changed, 262 insertions, 179 deletions
@@ -1,4 +1,35 @@ + --- 9.2.4rc3 released --- + +1623. [bug] A serial number of zero was being displayed in the + "sending notifies" log message when also-notify was + used. [RT #11177] + +1621. [bug] match-destinations did not work for IPv6 TCP queries. + [RT# 11156] + +1619. [bug] Missing ISC_LIST_UNLINK in end_reserved_dispatches(). + [RT# 11118] + +1617. [port] win32: VC++ 6.0 support. + +1616. [compat] Ensure that named's version is visible in the core + dump. [RT #11127] + +1615. [port] Define ISC_SOCKADDR_LEN_T based on _BSD_SOCKLEN_T_ if + it is defined. + +1614. [port] win32: silence resource limit messages. [RT# 11101] + +1610. [bug] On dual stack machines "dig -b" failed to set the + address type to be looked up with "@server". + [RT #11069] + +1600. [bug] Duplicate zone pre-load checks were not case + insensitive. + +1599. [bug] Fix memory leak on error path when checking named.conf. + --- 9.2.4rc2 released --- 1607. [bug] dig, host and nslookup were still using random() @@ -45,7 +45,7 @@ BIND 9 BIND 9.2.4 - BIND 9.2.3 is a maintenance release, containing fixes for + BIND 9.2.4 is a maintenance release, containing fixes for a number of bugs in 9.2.3. libbind: corresponds to that from BIND 8.4.5. diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 4189c10b..301a4649 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.221.2.21 2004/04/08 01:25:23 marka Exp $ */ +/* $Id: dighost.c,v 1.221.2.22 2004/04/15 06:53:18 marka Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -2521,7 +2521,9 @@ get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr) { } else { #ifdef USE_GETADDRINFO memset(&hints, 0, sizeof(hints)); - if (!have_ipv6) + if (specified_source) + hints.ai_family = isc_sockaddr_pf(&bind_address); + else if (!have_ipv6) hints.ai_family = PF_INET; else if (!have_ipv4) hints.ai_family = PF_INET6; diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index dce9cd73..ca7b9817 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -16,7 +16,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-signzone.c,v 1.139.2.3 2004/03/09 06:09:16 marka Exp $ */ +/* $Id: dnssec-signzone.c,v 1.139.2.5 2004/04/15 02:16:24 marka Exp $ */ #include <config.h> @@ -1241,7 +1241,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) { sevent->node = node; sevent->fname = fname; sevent->fnextname = fnextname; - isc_task_send(worker, (isc_event_t **)&sevent); + isc_task_send(worker, ISC_EVENT_PTR(&sevent)); assigned++; } @@ -1308,7 +1308,7 @@ sign(isc_task_t *task, isc_event_t *event) { fatal("failed to allocate event\n"); wevent->node = node; wevent->fname = fname; - isc_task_send(master, (isc_event_t **)&wevent); + isc_task_send(master, ISC_EVENT_PTR(&wevent)); } /* diff --git a/bin/named/client.c b/bin/named/client.c index 025360d5..f40c110a 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: client.c,v 1.176.2.14 2004/03/09 06:09:17 marka Exp $ */ +/* $Id: client.c,v 1.176.2.15 2004/04/28 14:17:03 marka Exp $ */ #include <config.h> @@ -1291,15 +1291,35 @@ client_request(isc_task_t *task, isc_event_t *event) { } /* - * Determine the destination address. For IPv6, we get this from the - * pktinfo structure (if supported). For IPv4, we have to make do with + * Determine the destination address. For TCP/IPv6, we get this from + * the receiving socket. For UDP/IPv6, we get it from the pktinfo + * structure (if supported). For IPv4, we have to do with * the address of the interface where the request was received. */ if (client->interface->addr.type.sa.sa_family == AF_INET6) { - if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0) + result = ISC_R_FAILURE; + + if (TCP_CLIENT(client)) { + isc_sockaddr_t destsockaddr; + + result = isc_socket_getsockname(client->tcpsocket, + &destsockaddr); + if (result == ISC_R_SUCCESS) + isc_netaddr_fromsockaddr(&destaddr, + &destsockaddr); + } + if (result != ISC_R_SUCCESS && + (client->attributes & NS_CLIENTATTR_PKTINFO) != 0) { isc_netaddr_fromin6(&destaddr, &client->pktinfo.ipi6_addr); - else - isc_netaddr_any6(&destaddr); + result = ISC_R_SUCCESS; + } + if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "failed to get request's " + "destination: %s", + isc_result_totext(result)); + goto cleanup; + } } else { isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr); } diff --git a/bin/named/config.c b/bin/named/config.c index c2787cb2..fc650ec6 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.c,v 1.11.2.5 2004/03/09 06:09:17 marka Exp $ */ +/* $Id: config.c,v 1.11.2.6 2004/04/19 23:15:38 marka Exp $ */ #include <config.h> @@ -43,14 +43,17 @@ static char defaultconf[] = "\ options {\n\ -# blackhole {none;};\n\ - coresize default;\n\ +# blackhole {none;};\n" +#ifndef WIN32 +" coresize default;\n\ datasize default;\n\ - deallocate-on-exit true;\n\ + files default;\n\ + stacksize default;\n" +#endif +" deallocate-on-exit true;\n\ # directory <none>\n\ dump-file \"named_dump.db\";\n\ fake-iquery no;\n\ - files default;\n\ has-old-clients false;\n\ heartbeat-interval 60;\n\ host-statistics no;\n\ @@ -74,7 +77,6 @@ options {\n\ rrset-order {order cyclic;};\n\ serial-queries 20;\n\ serial-query-rate 20;\n\ - stacksize default;\n\ statistics-file \"named.stats\";\n\ statistics-interval 60;\n\ tcp-clients 100;\n\ diff --git a/bin/named/main.c b/bin/named/main.c index 225e8a77..9c772c8f 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.119.2.8 2004/03/09 06:09:19 marka Exp $ */ +/* $Id: main.c,v 1.119.2.10 2004/04/20 13:54:17 marka Exp $ */ #include <config.h> @@ -68,7 +68,8 @@ static isc_boolean_t want_stats = ISC_FALSE; static char program_name[ISC_DIR_NAMEMAX] = "named"; static char absolute_conffile[ISC_DIR_PATHMAX]; -static char saved_command_line[512]; +static char saved_command_line[512]; +static char version[512]; void ns_main_earlywarning(const char *format, ...) { @@ -575,6 +576,17 @@ int main(int argc, char *argv[]) { isc_result_t result; + /* + * Record version in core image. + * strings named.core | grep "named version:" + */ +#ifdef __DATE__ + strncat(version, "named version: BIND " VERSION " (" __DATE__ ")", + sizeof(version)); +#else + strncat(version, "named version: BIND " VERSION, sizeof(version)); +#endif + version[sizeof(version) - 1] = '\0'; result = isc_file_progname(*argv, program_name, sizeof(program_name)); if (result != ISC_R_SUCCESS) ns_main_earlyfatal("program name too long"); diff --git a/bin/named/query.c b/bin/named/query.c index 40e59dbf..4c67fff0 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.198.2.17 2004/03/09 06:09:19 marka Exp $ */ +/* $Id: query.c,v 1.198.2.19 2004/04/15 02:16:25 marka Exp $ */ #include <config.h> @@ -3237,7 +3237,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) dns_db_detach(&zdb); } if (event != NULL) - isc_event_free((isc_event_t **)(&event)); + isc_event_free(ISC_EVENT_PTR(&event)); /* * AA bit. diff --git a/bin/named/server.c b/bin/named/server.c index a8c0bbd7..2339fe34 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.339.2.26 2004/04/10 05:02:59 marka Exp $ */ +/* $Id: server.c,v 1.339.2.28 2004/04/20 07:10:48 marka Exp $ */ #include <config.h> @@ -1070,8 +1070,8 @@ create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view) dns_dbversion_t *dbver = NULL; dns_difftuple_t *tuple; dns_diff_t diff; - isc_constregion_t r; - isc_constregion_t cr; + isc_region_t r; + isc_region_t cr; dns_rdata_t rdata = DNS_RDATA_INIT; static const char origindata[] = "\007authors\004bind"; dns_name_t origin; @@ -1104,9 +1104,9 @@ create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view) dns_diff_init(ns_g_mctx, &diff); dns_name_init(&origin, NULL); - r.base = origindata; + DE_CONST(origindata, r.base); r.length = sizeof(origindata); - dns_name_fromregion(&origin, (isc_region_t *)&r); + dns_name_fromregion(&origin, &r); CHECK(dns_zone_create(&zone, ns_g_mctx)); CHECK(dns_zone_setorigin(zone, &origin)); @@ -1126,11 +1126,11 @@ create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view) CHECK(dns_db_newversion(db, &dbver)); for (i = 0; authors[i] != NULL; i++) { - cr.base = authors[i]; + DE_CONST(authors[i], cr.base); cr.length = strlen(authors[i]); INSIST(cr.length == ((const unsigned char *)cr.base)[0] + 1U); dns_rdata_fromregion(&rdata, dns_rdataclass_ch, - dns_rdatatype_txt, (isc_region_t *)&cr); + dns_rdatatype_txt, &cr); tuple = NULL; CHECK(dns_difftuple_create(ns_g_mctx, DNS_DIFFOP_ADD, &origin, 0, &rdata, &tuple)); @@ -2550,15 +2550,17 @@ start_reserved_dispatches(ns_server_t *server) { static void end_reserved_dispatches(ns_server_t *server, isc_boolean_t all) { - ns_dispatch_t *dispatch; + ns_dispatch_t *dispatch, *nextdispatch; REQUIRE(NS_SERVER_VALID(server)); for (dispatch = ISC_LIST_HEAD(server->dispatches); dispatch != NULL; - dispatch = ISC_LIST_NEXT(dispatch, link)) { + dispatch = nextdispatch) { + nextdispatch = ISC_LIST_NEXT(dispatch, link); if (!all && server->dispatchgen == dispatch-> dispatchgen) continue; + ISC_LIST_UNLINK(server->dispatches, dispatch, link); dns_dispatch_detach(&dispatch->dispatch); isc_mem_put(server->mctx, dispatch, sizeof(*dispatch)); } diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index 10fb5872..08cdcf34 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: os.c,v 1.46.2.8 2004/03/09 06:09:23 marka Exp $ */ +/* $Id: os.c,v 1.46.2.9 2004/04/15 05:36:13 marka Exp $ */ #include <config.h> #include <stdarg.h> @@ -32,6 +32,9 @@ #include <stdlib.h> #include <signal.h> #include <syslog.h> +#ifdef HAVE_TZSET +#include <time.h> +#endif #include <unistd.h> #include <isc/file.h> diff --git a/bin/named/update.c b/bin/named/update.c index c558f15f..501bdaef 100644 --- a/bin/named/update.c +++ b/bin/named/update.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: update.c,v 1.88.2.6 2004/03/09 06:09:20 marka Exp $ */ +/* $Id: update.c,v 1.88.2.8 2004/04/15 02:16:25 marka Exp $ */ #include <config.h> @@ -1892,11 +1892,11 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) { event->ev_arg = evclient; dns_zone_gettask(zone, &zonetask); - isc_task_send(zonetask, (isc_event_t **)&event); + isc_task_send(zonetask, ISC_EVENT_PTR(&event)); failure: if (event != NULL) - isc_event_free((isc_event_t **)&event); + isc_event_free(ISC_EVENT_PTR(&event)); return (result); } @@ -2529,7 +2529,7 @@ forward_fail(isc_task_t *task, isc_event_t *event) { respond(client, DNS_R_SERVFAIL); ns_client_detach(&client); - isc_event_free((isc_event_t **)&event); + isc_event_free(&event); } @@ -2547,7 +2547,7 @@ forward_callback(void *arg, isc_result_t result, dns_message_t *answer) { uev->ev_action = forward_done; uev->answer = answer; } - isc_task_send(client->task, (isc_event_t**)&uev); + isc_task_send(client->task, ISC_EVENT_PTR(&uev)); } static void @@ -2559,7 +2559,7 @@ forward_done(isc_task_t *task, isc_event_t *event) { ns_client_sendraw(client, uev->answer); dns_message_destroy(&uev->answer); - isc_event_free((isc_event_t **)&event); + isc_event_free(&event); ns_client_detach(&client); } @@ -2601,10 +2601,10 @@ send_forward_event(ns_client_t *client, dns_zone_t *zone) { event->ev_arg = evclient; dns_zone_gettask(zone, &zonetask); - isc_task_send(zonetask, (isc_event_t **)&event); + isc_task_send(zonetask, ISC_EVENT_PTR(&event)); failure: if (event != NULL) - isc_event_free((isc_event_t **)&event); + isc_event_free(ISC_EVENT_PTR(&event)); return (result); } diff --git a/bin/named/xfrout.c b/bin/named/xfrout.c index 76a113ac..8823a7a0 100644 --- a/bin/named/xfrout.c +++ b/bin/named/xfrout.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: xfrout.c,v 1.101.2.7 2004/04/06 00:27:29 marka Exp $ */ +/* $Id: xfrout.c,v 1.101.2.8 2004/04/15 01:38:05 marka Exp $ */ #include <config.h> @@ -412,7 +412,7 @@ ixfr_rrstream_create(isc_mem_t *mctx, return (ISC_R_SUCCESS); failure: - ixfr_rrstream_destroy((rrstream_t **) &s); + ixfr_rrstream_destroy((rrstream_t **) (void *)&s); return (result); } @@ -499,7 +499,7 @@ axfr_rrstream_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *ver, return (ISC_R_SUCCESS); failure: - axfr_rrstream_destroy((rrstream_t **) &s); + axfr_rrstream_destroy((rrstream_t **) (void *)&s); return (result); } @@ -619,7 +619,7 @@ soa_rrstream_create(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *ver, return (ISC_R_SUCCESS); failure: - soa_rrstream_destroy((rrstream_t **) &s); + soa_rrstream_destroy((rrstream_t **) (void *)&s); return (result); } diff --git a/bin/tests/db/t_db.c b/bin/tests/db/t_db.c index 40eafe02..3f3324ed 100644 --- a/bin/tests/db/t_db.c +++ b/bin/tests/db/t_db.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_db.c,v 1.29.2.1 2004/03/09 06:09:36 marka Exp $ */ +/* $Id: t_db.c,v 1.29.2.2 2004/04/15 01:38:06 marka Exp $ */ #include <config.h> @@ -44,7 +44,7 @@ t_create(const char *db_type, const char *origin, const char *class, int len; isc_result_t dns_result; dns_dbtype_t dbtype; - isc_constregion_t region; + isc_textregion_t region; isc_buffer_t origin_buffer; dns_fixedname_t dns_origin; dns_rdataclass_t rdataclass; @@ -66,10 +66,9 @@ t_create(const char *db_type, const char *origin, const char *class, return(dns_result); } - region.base = class; + DE_CONST(class, region.base); region.length = strlen(class); - dns_result = dns_rdataclass_fromtext(&rdataclass, - (isc_textregion_t *)®ion); + dns_result = dns_rdataclass_fromtext(&rdataclass, ®ion); if (dns_result != ISC_R_SUCCESS) { t_info("dns_rdataclass_fromtext failed %s\n", dns_result_totext(dns_result)); diff --git a/bin/win32/BINDInstall/BINDInstall.cpp b/bin/win32/BINDInstall/BINDInstall.cpp index 3b143d76..e996df9e 100644 --- a/bin/win32/BINDInstall/BINDInstall.cpp +++ b/bin/win32/BINDInstall/BINDInstall.cpp @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: BINDInstall.cpp,v 1.3.2.1 2004/03/09 06:10:31 marka Exp $ */ +/* $Id: BINDInstall.cpp,v 1.3.2.2 2004/04/19 06:56:24 marka Exp $ */ /* * Copyright (c) 1999-2000 by Nortel Networks Corporation @@ -78,12 +78,13 @@ BOOL CBINDInstallApp::InitInstance() // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. - +#if _MSC_VER < 1300 #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif +#endif CBINDInstallDlg dlg; m_pMainWnd = &dlg; diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index 544a1967..6f5844ec 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: BINDInstallDlg.cpp,v 1.6.2.9 2004/03/09 06:10:31 marka Exp $ */ +/* $Id: BINDInstallDlg.cpp,v 1.6.2.10 2004/04/19 06:56:24 marka Exp $ */ /* * Copyright (c) 1999-2000 by Nortel Networks Corporation @@ -109,8 +109,10 @@ const FileData installFiles[] = {"msvcrt.dll", FileData::WinSystem, FileData::Critical, TRUE}, # endif #endif +#if _MSC_VER > 1200 {"mfc70.dll", FileData::WinSystem, FileData::Critical, TRUE}, {"msvcr70.dll", FileData::WinSystem, FileData::Critical, TRUE}, +#endif {"bindevt.dll", FileData::WinSystem, FileData::Normal, FALSE}, {"libisc.dll", FileData::WinSystem, FileData::Critical, FALSE}, {"libisccfg.dll", FileData::WinSystem, FileData::Critical, FALSE}, diff --git a/config.h.win32 b/config.h.win32 index 50a52343..318df49b 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.win32,v 1.6.2.2 2004/04/10 04:07:08 marka Exp $ */ +/* $Id: config.h.win32,v 1.6.2.3 2004/04/19 06:56:23 marka Exp $ */ /* * win32 configuration file @@ -202,7 +202,7 @@ typedef long off_t; #define close _close #define write _write #endif - +#include <io.h> #define isatty _isatty #ifndef _WINSOCKAPI_ diff --git a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.4-patch b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.4-patch index 3096c071..fe7860ec 100644 --- a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.4-patch +++ b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.4-patch @@ -17,8 +17,8 @@ and install. Index: README.idnkit ---- /dev/null Tue Apr 13 09:53:48 2004 -+++ README.idnkit Tue Apr 13 09:34:36 2004 +--- /dev/null Thu Apr 29 11:15:03 2004 ++++ README.idnkit Thu Apr 29 11:05:40 2004 @@ -0,0 +1,113 @@ + + BIND-9 IDN patch @@ -139,7 +139,7 @@ RCS file: /proj/cvs/prod/bind9/configure,v retrieving revision 1.284.2.28 diff -U2 -r1.284.2.28 configure --- configure 10 Mar 2004 03:25:48 -0000 1.284.2.28 -+++ configure 12 Apr 2004 23:58:50 -0000 ++++ configure 29 Apr 2004 01:16:48 -0000 @@ -466,5 +466,5 @@ #endif" @@ -699,7 +699,7 @@ RCS file: /proj/cvs/prod/bind9/configure.in,v retrieving revision 1.294.2.31 diff -U2 -r1.294.2.31 configure.in --- configure.in 10 Mar 2004 03:24:06 -0000 1.294.2.31 -+++ configure.in 12 Apr 2004 23:58:53 -0000 ++++ configure.in 29 Apr 2004 01:16:52 -0000 @@ -1756,4 +1756,80 @@ # @@ -787,7 +787,7 @@ RCS file: /proj/cvs/prod/bind9/config.h.in,v retrieving revision 1.47.2.8 diff -U2 -r1.47.2.8 config.h.in --- config.h.in 15 Mar 2004 05:00:23 -0000 1.47.2.8 -+++ config.h.in 12 Apr 2004 23:58:54 -0000 ++++ config.h.in 29 Apr 2004 01:16:52 -0000 @@ -17,5 +17,5 @@ */ @@ -823,7 +823,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/Makefile.in,v retrieving revision 1.25.2.2 diff -U2 -r1.25.2.2 Makefile.in --- bin/dig/Makefile.in 9 Mar 2004 06:09:10 -0000 1.25.2.2 -+++ bin/dig/Makefile.in 12 Apr 2004 23:58:54 -0000 ++++ bin/dig/Makefile.in 29 Apr 2004 01:16:52 -0000 @@ -37,5 +37,5 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} @@ -837,7 +837,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/dig.1,v retrieving revision 1.14.2.5 diff -U2 -r1.14.2.5 dig.1 --- bin/dig/dig.1 15 Mar 2004 04:44:38 -0000 1.14.2.5 -+++ bin/dig/dig.1 12 Apr 2004 23:58:55 -0000 ++++ bin/dig/dig.1 29 Apr 2004 01:16:53 -0000 @@ -355,4 +355,15 @@ will not print the initial query when it looks up the NS records for isc.org. @@ -860,7 +860,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/dig.docbook,v retrieving revision 1.4.2.8 diff -U2 -r1.4.2.8 dig.docbook --- bin/dig/dig.docbook 9 Mar 2004 06:09:12 -0000 1.4.2.8 -+++ bin/dig/dig.docbook 12 Apr 2004 23:58:57 -0000 ++++ bin/dig/dig.docbook 29 Apr 2004 01:16:55 -0000 @@ -530,4 +530,19 @@ <refsect1> @@ -884,10 +884,10 @@ diff -U2 -r1.4.2.8 dig.docbook Index: bin/dig/dighost.c =================================================================== RCS file: /proj/cvs/prod/bind9/bin/dig/dighost.c,v -retrieving revision 1.221.2.21 -diff -U2 -r1.221.2.21 dighost.c ---- bin/dig/dighost.c 8 Apr 2004 01:25:23 -0000 1.221.2.21 -+++ bin/dig/dighost.c 12 Apr 2004 23:59:02 -0000 +retrieving revision 1.221.2.22 +diff -U2 -r1.221.2.22 dighost.c +--- bin/dig/dighost.c 15 Apr 2004 06:53:18 -0000 1.221.2.22 ++++ bin/dig/dighost.c 29 Apr 2004 01:17:00 -0000 @@ -33,4 +33,15 @@ #include <limits.h> @@ -1019,7 +1019,7 @@ diff -U2 -r1.221.2.21 dighost.c +#endif } if (result != ISC_R_SUCCESS) { -@@ -2720,2 +2805,100 @@ +@@ -2722,2 +2807,100 @@ isc_mem_destroy(&mctx); } + @@ -1126,7 +1126,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/host.1,v retrieving revision 1.11.2.2 diff -U2 -r1.11.2.2 host.1 --- bin/dig/host.1 15 Mar 2004 04:44:38 -0000 1.11.2.2 -+++ bin/dig/host.1 12 Apr 2004 23:59:03 -0000 ++++ bin/dig/host.1 29 Apr 2004 01:17:01 -0000 @@ -122,4 +122,15 @@ will be set to the number of seconds given by the hardware's maximum value for an integer quantity. @@ -1149,7 +1149,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/host.docbook,v retrieving revision 1.2.2.3 diff -U2 -r1.2.2.3 host.docbook --- bin/dig/host.docbook 9 Mar 2004 06:09:13 -0000 1.2.2.3 -+++ bin/dig/host.docbook 12 Apr 2004 23:59:03 -0000 ++++ bin/dig/host.docbook 29 Apr 2004 01:17:01 -0000 @@ -182,4 +182,19 @@ <refsect1> @@ -1176,7 +1176,7 @@ RCS file: /proj/cvs/prod/bind9/lib/dns/name.c,v retrieving revision 1.127.2.9 diff -U2 -r1.127.2.9 name.c --- lib/dns/name.c 9 Mar 2004 06:11:03 -0000 1.127.2.9 -+++ lib/dns/name.c 12 Apr 2004 23:59:09 -0000 ++++ lib/dns/name.c 29 Apr 2004 01:17:07 -0000 @@ -196,4 +196,11 @@ dns_name_t *dns_wildcardname = &wild; @@ -1221,7 +1221,7 @@ RCS file: /proj/cvs/prod/bind9/lib/dns/include/dns/name.h,v retrieving revision 1.95.2.5 diff -U2 -r1.95.2.5 name.h --- lib/dns/include/dns/name.h 9 Mar 2004 06:11:19 -0000 1.95.2.5 -+++ lib/dns/include/dns/name.h 12 Apr 2004 23:59:11 -0000 ++++ lib/dns/include/dns/name.h 29 Apr 2004 01:17:09 -0000 @@ -220,4 +220,15 @@ #define DNS_NAME_MAXWIRE 255 diff --git a/lib/bind/api b/lib/bind/api index 8d3f5f7c..c4b90597 100644 --- a/lib/bind/api +++ b/lib/bind/api @@ -1,3 +1,3 @@ LIBINTERFACE = 3 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 0 diff --git a/lib/bind/irs/gethostent_r.c b/lib/bind/irs/gethostent_r.c index 3fec6758..0caf02a9 100644 --- a/lib/bind/irs/gethostent_r.c +++ b/lib/bind/irs/gethostent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.2.1 2004/03/09 09:17:30 marka Exp $"; +static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.2.2 2004/04/22 03:21:02 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <port_before.h> @@ -214,8 +214,8 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { /* copy up to first 35 addresses */ i = 0; - cp = hdptr->hostaddr; - eob = hdptr->hostaddr + sizeof(hdptr->hostaddr); + cp = hdptr->hostbuf; + eob = hdptr->hostbuf + sizeof(hdptr->hostbuf); hptr->h_addr_list = hdptr->h_addr_ptrs; while (he->h_addr_list[i] && i < (_MAXADDRS)) { if (n < (eob - cp)) { @@ -230,8 +230,6 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { hptr->h_addr_list[i] = NULL; /* copy official name */ - cp = hdptr->hostbuf; - eob = hdptr->hostbuf + sizeof(hdptr->hostbuf); if ((n = strlen(he->h_name) + 1) < (eob - cp)) { strcpy(cp, he->h_name); hptr->h_name = cp; diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in index c4f8fcee..a8bc346f 100644 --- a/lib/dns/Makefile.in +++ b/lib/dns/Makefile.in @@ -13,12 +13,16 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.126.2.8 2004/03/09 06:10:58 marka Exp $ +# $Id: Makefile.in,v 1.126.2.9 2004/04/15 00:35:27 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ +# Attempt to disable parallel processing. +.NOTPARALLEL: +.NO_PARALLEL: + @BIND9_VERSION@ @LIBDNS_API@ diff --git a/lib/dns/api b/lib/dns/api index b4d01735..e8ad22bc 100644 --- a/lib/dns/api +++ b/lib/dns/api @@ -1,3 +1,3 @@ LIBINTERFACE = 12 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 1 diff --git a/lib/dns/dbtable.c b/lib/dns/dbtable.c index 8112d8ba..e814722d 100644 --- a/lib/dns/dbtable.c +++ b/lib/dns/dbtable.c @@ -16,7 +16,7 @@ */ /* - * $Id: dbtable.c,v 1.25.2.1 2004/03/09 06:11:00 marka Exp $ + * $Id: dbtable.c,v 1.25.2.2 2004/04/15 01:38:06 marka Exp $ */ /* @@ -211,7 +211,7 @@ dns_dbtable_remove(dns_dbtable_t *dbtable, dns_db_t *db) { RWLOCK(&dbtable->tree_lock, isc_rwlocktype_write); result = dns_rbt_findname(dbtable->rbt, name, 0, NULL, - (void **)&stored_data); + (void **) (void *)&stored_data); if (result == ISC_R_SUCCESS) { INSIST(stored_data == db); @@ -275,7 +275,7 @@ dns_dbtable_find(dns_dbtable_t *dbtable, dns_name_t *name, RWLOCK(&dbtable->tree_lock, isc_rwlocktype_read); result = dns_rbt_findname(dbtable->rbt, name, rbtoptions, NULL, - (void **)&stored_data); + (void **) (void *)&stored_data); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) dns_db_attach(stored_data, dbp); diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 06361fe3..ad4f30c3 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dispatch.c,v 1.101.2.8 2004/03/09 06:11:01 marka Exp $ */ +/* $Id: dispatch.c,v 1.101.2.10 2004/04/15 02:16:26 marka Exp $ */ #include <config.h> @@ -670,7 +670,7 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in) { rev, rev->buffer.base, rev->buffer.length, resp->task); resp->item_out = ISC_TRUE; - isc_task_send(resp->task, (isc_event_t **)&rev); + isc_task_send(resp->task, ISC_EVENT_PTR(&rev)); } /* @@ -846,7 +846,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in) { rev, rev->buffer.base, rev->buffer.length, resp->task); resp->item_out = ISC_TRUE; - isc_task_send(resp->task, (isc_event_t **)&rev); + isc_task_send(resp->task, ISC_EVENT_PTR(&rev)); } /* @@ -1984,7 +1984,7 @@ do_cancel(dns_dispatch_t *disp, dns_dispentry_t *resp) { "cancel: failsafe event %p -> task %p", ev, resp->task); resp->item_out = ISC_TRUE; - isc_task_send(resp->task, (isc_event_t **)&ev); + isc_task_send(resp->task, ISC_EVENT_PTR(&ev)); } isc_socket_t * @@ -2080,7 +2080,7 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event) { buf = allocate_udp_buffer(disp); if (buf == NULL) { - isc_event_free((isc_event_t **)&newsevent); + isc_event_free(ISC_EVENT_PTR(&newsevent)); return; } memcpy(buf, sevent->region.base, sevent->n); @@ -2093,7 +2093,7 @@ dns_dispatch_importrecv(dns_dispatch_t *disp, isc_event_t *event) { newsevent->pktinfo = sevent->pktinfo; newsevent->attributes = sevent->attributes; - isc_task_send(disp->task, (isc_event_t **)&newsevent); + isc_task_send(disp->task, ISC_EVENT_PTR(&newsevent)); } #if 0 diff --git a/lib/dns/lookup.c b/lib/dns/lookup.c index b6f43378..37cf1a54 100644 --- a/lib/dns/lookup.c +++ b/lib/dns/lookup.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lookup.c,v 1.9.2.1 2004/03/09 06:11:03 marka Exp $ */ +/* $Id: lookup.c,v 1.9.2.3 2004/04/15 02:16:27 marka Exp $ */ #include <config.h> @@ -321,7 +321,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) { dns_db_detachnode(event->db, &event->node); if (event->db != NULL) dns_db_detach(&event->db); - isc_event_free((isc_event_t **)&event); + isc_event_free(ISC_EVENT_PTR(&event)); } /* diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 74f61146..305e75ee 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.168.2.16 2004/03/09 06:11:04 marka Exp $ */ +/* $Id: rbtdb.c,v 1.168.2.17 2004/04/15 01:38:07 marka Exp $ */ /* * Principal Author: Bob Halley @@ -3325,7 +3325,7 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, REQUIRE(type != dns_rdatatype_any); if (rbtversion == NULL) { - currentversion(db, (dns_dbversion_t **)(&rbtversion)); + currentversion(db, (dns_dbversion_t **) (void *)(&rbtversion)); close_version = ISC_TRUE; } serial = rbtversion->serial; @@ -3383,7 +3383,8 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock); if (close_version) - closeversion(db, (dns_dbversion_t **)(&rbtversion), ISC_FALSE); + closeversion(db, (dns_dbversion_t **) (void *)(&rbtversion), + ISC_FALSE); if (found == NULL) return (ISC_R_NOTFOUND); @@ -3489,7 +3490,8 @@ allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, if ((db->attributes & DNS_DBATTR_CACHE) == 0) { now = 0; if (rbtversion == NULL) - currentversion(db, (dns_dbversion_t **)(&rbtversion)); + currentversion(db, + (dns_dbversion_t **) (void *)(&rbtversion)); else { LOCK(&rbtdb->lock); INSIST(rbtversion->references > 0); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index bc6d5b43..27588c27 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.218.2.29 2004/03/09 06:11:07 marka Exp $ */ +/* $Id: resolver.c,v 1.218.2.31 2004/04/15 02:16:27 marka Exp $ */ #include <config.h> @@ -627,7 +627,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) { fctx->type == dns_rdatatype_any || fctx->type == dns_rdatatype_sig); - isc_task_sendanddetach(&task, (isc_event_t **)&event); + isc_task_sendanddetach(&task, ISC_EVENT_PTR(&event)); } } @@ -5263,7 +5263,7 @@ dns_resolver_cancelfetch(dns_fetch_t *fetch) { etask = event->ev_sender; event->ev_sender = fctx; event->result = ISC_R_CANCELED; - isc_task_sendanddetach(&etask, (isc_event_t **)&event); + isc_task_sendanddetach(&etask, ISC_EVENT_PTR(&event)); } /* * The fctx continues running even if no fetches remain; diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index b2a4507e..eb6d38aa 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sdb.c,v 1.35.2.4 2004/03/09 06:11:07 marka Exp $ */ +/* $Id: sdb.c,v 1.35.2.5 2004/04/15 01:38:08 marka Exp $ */ #include <config.h> @@ -283,7 +283,7 @@ dns_sdb_putrr(dns_sdblookup_t *lookup, const char *type, dns_ttl_t ttl, dns_rdatalist_t *rdatalist; dns_rdata_t *rdata; dns_rdatatype_t typeval; - isc_consttextregion_t r; + isc_textregion_t r; isc_buffer_t b; isc_buffer_t *rdatabuf; isc_lex_t *lex; @@ -299,9 +299,9 @@ dns_sdb_putrr(dns_sdblookup_t *lookup, const char *type, dns_ttl_t ttl, mctx = lookup->sdb->common.mctx; - r.base = type; + DE_CONST(type, r.base); r.length = strlen(type); - result = dns_rdatatype_fromtext(&typeval, (isc_textregion_t *)&r); + result = dns_rdatatype_fromtext(&typeval, &r); if (result != ISC_R_SUCCESS) return (result); @@ -661,7 +661,7 @@ destroynode(dns_sdbnode_t *node) { DESTROYLOCK(&node->lock); node->magic = 0; isc_mem_put(mctx, node, sizeof(dns_sdbnode_t)); - detach((dns_db_t **)&sdb); + detach((dns_db_t **) (void *)&sdb); } static isc_result_t @@ -999,7 +999,7 @@ createiterator(dns_db_t *db, isc_boolean_t relative_names, result = imp->methods->allnodes(sdb->zone, sdb->dbdata, sdbiter); MAYBE_UNLOCK(sdb); if (result != ISC_R_SUCCESS) { - dbiterator_destroy((dns_dbiterator_t **)&sdbiter); + dbiterator_destroy((dns_dbiterator_t **) (void *)&sdbiter); return (result); } diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 7f2d79f2..34165819 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: validator.c,v 1.91.2.6 2004/03/09 06:11:10 marka Exp $ */ +/* $Id: validator.c,v 1.91.2.8 2004/04/15 02:16:28 marka Exp $ */ #include <config.h> @@ -1546,7 +1546,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, ISC_LINK_INIT(val, link); val->magic = VALIDATOR_MAGIC; - isc_task_send(task, (isc_event_t **)&event); + isc_task_send(task, ISC_EVENT_PTR(&event)); *validatorp = val; diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 51d6cb92..35a1e43c 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.333.2.31 2004/03/09 06:11:11 marka Exp $ */ +/* $Id: zone.c,v 1.333.2.32 2004/04/28 04:23:34 marka Exp $ */ #include <config.h> @@ -2643,7 +2643,7 @@ zone_notify(dns_zone_t *zone) { dns_name_t master; dns_rdata_ns_t ns; dns_rdata_soa_t soa; - isc_uint32_t serial = 0; + isc_uint32_t serial; dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdataset_t nsrdset; dns_rdataset_t soardset; @@ -2679,6 +2679,38 @@ zone_notify(dns_zone_t *zone) { flags |= DNS_NOTIFY_NOSOA; /* + * Get SOA RRset. + */ + dns_db_currentversion(zone->db, &version); + result = dns_db_findnode(zone->db, origin, ISC_FALSE, &node); + if (result != ISC_R_SUCCESS) + goto cleanup1; + + dns_rdataset_init(&soardset); + result = dns_db_findrdataset(zone->db, node, version, + dns_rdatatype_soa, + dns_rdatatype_none, 0, &soardset, NULL); + if (result != ISC_R_SUCCESS) + goto cleanup2; + + /* + * Find serial and master server's name. + */ + dns_name_init(&master, NULL); + result = dns_rdataset_first(&soardset); + if (result != ISC_R_SUCCESS) + goto cleanup3; + dns_rdataset_current(&soardset, &rdata); + result = dns_rdata_tostruct(&rdata, &soa, NULL); + RUNTIME_CHECK(result == ISC_R_SUCCESS); + dns_rdata_reset(&rdata); + result = dns_name_dup(&soa.origin, zone->mctx, &master); + serial = soa.serial; + dns_rdataset_disassociate(&soardset); + if (result != ISC_R_SUCCESS) + goto cleanup3; + + /* * Enqueue notify requests for 'also-notify' servers. */ LOCK_ZONE(zone); @@ -2687,19 +2719,14 @@ zone_notify(dns_zone_t *zone) { if (notify_isqueued(zone, NULL, &dst)) continue; result = notify_create(zone->mctx, flags, ¬ify); - if (result != ISC_R_SUCCESS) { - UNLOCK_ZONE(zone); - return; - } + if (result != ISC_R_SUCCESS) + continue; zone_iattach(zone, ¬ify->zone); notify->dst = dst; ISC_LIST_APPEND(zone->notifies, notify, link); result = notify_send_queue(notify); - if (result != ISC_R_SUCCESS) { + if (result != ISC_R_SUCCESS) notify_destroy(notify, ISC_TRUE); - UNLOCK_ZONE(zone); - return; - } if (!loggednotify) { notify_log(zone, ISC_LOG_INFO, "sending notifies (serial %u)", @@ -2711,43 +2738,12 @@ zone_notify(dns_zone_t *zone) { UNLOCK_ZONE(zone); if (notifytype == dns_notifytype_explicit) - return; - + goto cleanup3; + /* * Process NS RRset to generate notifies. */ - dns_db_currentversion(zone->db, &version); - result = dns_db_findnode(zone->db, origin, ISC_FALSE, &node); - if (result != ISC_R_SUCCESS) - goto cleanup1; - - dns_rdataset_init(&soardset); - result = dns_db_findrdataset(zone->db, node, version, - dns_rdatatype_soa, - dns_rdatatype_none, 0, &soardset, NULL); - if (result != ISC_R_SUCCESS) - goto cleanup2; - - /* - * Find master server's name. - */ - dns_name_init(&master, NULL); - result = dns_rdataset_first(&soardset); - if (result == ISC_R_SUCCESS) { - dns_rdataset_current(&soardset, &rdata); - result = dns_rdata_tostruct(&rdata, &soa, NULL); - dns_rdata_reset(&rdata); - if (result == ISC_R_SUCCESS) { - result = dns_name_dup(&soa.origin, zone->mctx, - &master); - serial = soa.serial; - } - dns_rdataset_disassociate(&soardset); - } - if (result != ISC_R_SUCCESS) - goto cleanup3; - dns_rdataset_init(&nsrdset); result = dns_db_findrdataset(zone->db, node, version, dns_rdatatype_ns, diff --git a/lib/dns/zt.c b/lib/dns/zt.c index 22d457ed..9efdee7c 100644 --- a/lib/dns/zt.c +++ b/lib/dns/zt.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zt.c,v 1.33.2.2 2004/03/09 06:11:11 marka Exp $ */ +/* $Id: zt.c,v 1.33.2.3 2004/04/15 01:38:09 marka Exp $ */ #include <config.h> @@ -148,7 +148,7 @@ dns_zt_find(dns_zt_t *zt, dns_name_t *name, unsigned int options, RWLOCK(&zt->rwlock, isc_rwlocktype_read); result = dns_rbt_findname(zt->table, name, rbtoptions, foundname, - (void **)&dummy); + (void **) (void*)&dummy); if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) dns_zone_attach(dummy, zonep); diff --git a/lib/isc/api b/lib/isc/api index 2f54dd6f..dfec2844 100644 --- a/lib/isc/api +++ b/lib/isc/api @@ -1,3 +1,3 @@ LIBINTERFACE = 8 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 1 diff --git a/lib/isc/include/isc/event.h b/lib/isc/include/isc/event.h index 75ba64e3..f3cca874 100644 --- a/lib/isc/include/isc/event.h +++ b/lib/isc/include/isc/event.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: event.h,v 1.24.2.3 2004/03/09 06:11:55 marka Exp $ */ +/* $Id: event.h,v 1.24.2.4 2004/04/15 02:16:29 marka Exp $ */ #ifndef ISC_EVENT_H #define ISC_EVENT_H 1 @@ -82,6 +82,8 @@ struct isc_event { #define ISC_EVENTTYPE_FIRSTEVENT 0x00000000 #define ISC_EVENTTYPE_LASTEVENT 0xffffffff +#define ISC_EVENT_PTR(p) ((isc_event_t **)(void *)(p)) + ISC_LANG_BEGINDECLS isc_event_t * diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h index b6043efb..d6e40715 100644 --- a/lib/isc/include/isc/refcount.h +++ b/lib/isc/include/isc/refcount.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: refcount.h,v 1.3.2.4 2004/03/09 06:12:00 marka Exp $ */ +/* $Id: refcount.h,v 1.3.2.5 2004/04/14 05:20:19 marka Exp $ */ #ifndef ISC_REFCOUNT_H #define ISC_REFCOUNT_H 1 @@ -143,16 +143,18 @@ typedef struct isc_refcount { #define isc_refcount_increment(rp, tp) \ do { \ + unsigned int *_tmp = (unsigned int *)(tp); \ int _n = ++(rp)->refs; \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = (unsigned int)(_n); \ + if (_tmp != NULL) \ + *_tmp = _n; \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ + unsigned int *_tmp = (unsigned int *)(tp); \ int _n = --(rp)->refs; \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = (unsigned int)(_n); \ + if (_tmp != NULL) \ + *_tmp = _n; \ } while (0) #endif diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 492714dc..52a802d8 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.207.2.24 2004/03/17 05:33:38 marka Exp $ */ +/* $Id: socket.c,v 1.207.2.27 2004/04/19 02:56:46 marka Exp $ */ #include <config.h> @@ -62,8 +62,12 @@ * some as socklen_t. This is here so it can be easily changed if needed. */ #ifndef ISC_SOCKADDR_LEN_T +#ifdef _BSD_SOCKLEN_T_ +#define ISC_SOCKADDR_LEN_T _BSD_SOCKLEN_T_ +#else #define ISC_SOCKADDR_LEN_T unsigned int #endif +#endif /* * Define what the possible "soft" errors can be. These are non-fatal returns @@ -1958,7 +1962,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) { task = dev->ev_sender; dev->ev_sender = sock; - isc_task_sendanddetach(&task, (isc_event_t **)&dev); + isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev)); return; soft_error: @@ -2964,7 +2968,7 @@ isc_socket_accept(isc_socket_t *sock, ret = allocate_socket(manager, sock->type, &nsock); if (ret != ISC_R_SUCCESS) { - isc_event_free((isc_event_t **)&dev); + isc_event_free(ISC_EVENT_PTR(&dev)); UNLOCK(&sock->lock); return (ret); } @@ -3064,12 +3068,12 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, UNEXPECTED_ERROR(__FILE__, __LINE__, "%d/%s", errno, strbuf); UNLOCK(&sock->lock); - isc_event_free((isc_event_t **)&dev); + isc_event_free(ISC_EVENT_PTR(&dev)); return (ISC_R_UNEXPECTED); err_exit: sock->connected = 0; - isc_task_send(task, (isc_event_t **)&dev); + isc_task_send(task, ISC_EVENT_PTR(&dev)); UNLOCK(&sock->lock); return (ISC_R_SUCCESS); @@ -3082,7 +3086,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, sock->connected = 1; sock->bound = 1; dev->result = ISC_R_SUCCESS; - isc_task_send(task, (isc_event_t **)&dev); + isc_task_send(task, ISC_EVENT_PTR(&dev)); UNLOCK(&sock->lock); return (ISC_R_SUCCESS); @@ -3220,7 +3224,7 @@ internal_connect(isc_task_t *me, isc_event_t *ev) { task = dev->ev_sender; dev->ev_sender = sock; - isc_task_sendanddetach(&task, (isc_event_t **)&dev); + isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev)); } isc_result_t @@ -3368,7 +3372,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) { dev->result = ISC_R_CANCELED; dev->ev_sender = sock; isc_task_sendanddetach(¤t_task, - (isc_event_t **)&dev); + ISC_EVENT_PTR(&dev)); } dev = next; @@ -3395,7 +3399,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) { dev->result = ISC_R_CANCELED; dev->ev_sender = sock; isc_task_sendanddetach(¤t_task, - (isc_event_t **)&dev); + ISC_EVENT_PTR(&dev)); } } diff --git a/lib/isccfg/api b/lib/isccfg/api index be7faa69..d5e745c0 100644 --- a/lib/isccfg/api +++ b/lib/isccfg/api @@ -1,3 +1,3 @@ LIBINTERFACE = 0 -LIBREVISION = 8 +LIBREVISION = 9 LIBAGE = 0 diff --git a/lib/isccfg/check.c b/lib/isccfg/check.c index 602d2148..664a807f 100644 --- a/lib/isccfg/check.c +++ b/lib/isccfg/check.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.14.2.22 2004/03/09 06:12:30 marka Exp $ */ +/* $Id: check.c,v 1.14.2.23 2004/04/16 00:02:00 marka Exp $ */ #include <config.h> @@ -36,6 +36,13 @@ #include <isccfg/cfg.h> #include <isccfg/check.h> +static void +freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) { + UNUSED(type); + UNUSED(value); + isc_mem_free(userarg, key); +} + static isc_result_t check_forward(cfg_obj_t *options, isc_log_t *logctx) { cfg_obj_t *forward = NULL; @@ -268,7 +275,8 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx, "zone '%s': already exists ", zname); result = ISC_R_FAILURE; } else if (tresult != ISC_R_SUCCESS) { - isc_mem_strdup(mctx, key); + isc_mem_free(mctx, key); + return (tresult); } } @@ -435,13 +443,6 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) { return (result); } -static void -freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) { - UNUSED(type); - UNUSED(value); - isc_mem_free(userarg, key); -} - static isc_result_t check_servers(cfg_obj_t *servers, isc_log_t *logctx) { isc_result_t result = ISC_R_SUCCESS; @@ -493,7 +494,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, isc_log_t *logctx, isc_mem * there are no duplicate zones. */ tresult = isc_symtab_create(mctx, 100, freekey, mctx, - ISC_TRUE, &symtab); + ISC_FALSE, &symtab); if (tresult != ISC_R_SUCCESS) return (ISC_R_NOMEMORY); @@ -1,4 +1,4 @@ -# $Id: version,v 1.26.2.24 2004/04/12 23:27:09 marka Exp $ +# $Id: version,v 1.26.2.25 2004/04/28 07:10:04 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=2 PATCHVER=4 RELEASETYPE=rc -RELEASEVER=2 +RELEASEVER=3 |