summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2007-09-07 14:14:43 -0600
committerLaMont Jones <lamont@debian.org>2007-09-07 14:14:43 -0600
commitc83e70048513fc5611b7e0cd69bda040d3355bc2 (patch)
tree31d241dd8b95d328bd8032a75e213ad094817cbd /bin
parent94465e63cbfb35aed26ac350f7b55fcbbd88eb7b (diff)
downloadbind9-c83e70048513fc5611b7e0cd69bda040d3355bc2.tar.gz
9.2.4rc3
Diffstat (limited to 'bin')
-rw-r--r--bin/dig/dighost.c6
-rw-r--r--bin/dnssec/dnssec-signzone.c6
-rw-r--r--bin/named/client.c32
-rw-r--r--bin/named/config.c14
-rw-r--r--bin/named/main.c16
-rw-r--r--bin/named/query.c4
-rw-r--r--bin/named/server.c20
-rw-r--r--bin/named/unix/os.c5
-rw-r--r--bin/named/update.c16
-rw-r--r--bin/named/xfrout.c8
-rw-r--r--bin/tests/db/t_db.c9
-rw-r--r--bin/win32/BINDInstall/BINDInstall.cpp5
-rw-r--r--bin/win32/BINDInstall/BINDInstallDlg.cpp4
13 files changed, 94 insertions, 51 deletions
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 *)&region);
+ dns_result = dns_rdataclass_fromtext(&rdataclass, &region);
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},