diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:14:31 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:14:31 -0600 |
commit | 827006a436e7babc39b4b5b52797aa54313f5be6 (patch) | |
tree | 897f21a87e0eb0131628e6c39691789563ee78d7 /bin/named/server.c | |
parent | ad2d173ed9521052e7fd8ba2cd10117cdea6f058 (diff) | |
download | bind9-827006a436e7babc39b4b5b52797aa54313f5be6.tar.gz |
9.2.3rc1
Diffstat (limited to 'bin/named/server.c')
-rw-r--r-- | bin/named/server.c | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/bin/named/server.c b/bin/named/server.c index 3cf2ce4b..cb4a78b8 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.339.2.8.4.3 2003/02/18 03:27:58 marka Exp $ */ +/* $Id: server.c,v 1.339.2.15 2003/07/25 03:31:41 marka Exp $ */ #include <config.h> @@ -26,6 +26,7 @@ #include <isc/dir.h> #include <isc/entropy.h> #include <isc/file.h> +#include <isc/hash.h> #include <isc/lex.h> #include <isc/print.h> #include <isc/resource.h> @@ -163,7 +164,7 @@ configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config, return (result); } -#ifdef ISC_RFC2335 +#ifdef ISC_RFC2535 static isc_result_t configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key, dns_keytable_t *keytable, isc_mem_t *mctx) @@ -398,9 +399,24 @@ get_view_querysource_dispatch(cfg_obj_t **maps, 1000, 32768, 16411, 16433, attrs, attrmask, &disp); if (result != ISC_R_SUCCESS) { + isc_sockaddr_t any; + char buf[ISC_SOCKADDR_FORMATSIZE]; + + switch (af) { + case AF_INET: + isc_sockaddr_any(&any); + break; + case AF_INET6: + isc_sockaddr_any6(&any); + break; + } + if (isc_sockaddr_equal(&sa, &any)) + return (ISC_R_SUCCESS); + isc_sockaddr_format(&sa, buf, sizeof(buf)); isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_ERROR, - "could not get query source dispatcher"); + "could not get query source dispatcher (%s)", + buf); return (result); } @@ -921,7 +937,7 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) { INSIST(result == ISC_R_SUCCESS); versiontext = cfg_obj_asstring(obj); len = strlen(versiontext); - if (len > 255) + if (len > 255U) len = 255; /* Silently truncate. */ buf[0] = len; memcpy(buf + 1, versiontext, len); @@ -2162,6 +2178,12 @@ load_new_zones(ns_server_t *server, isc_boolean_t stop) { { CHECK(dns_view_loadnew(view, stop)); } + /* + * Force zone maintenance. Do this after loading + * so that we know when we need to force AXFR of + * slave zones whose master files are missing. + */ + CHECK(dns_zonemgr_forcemaint(server->zonemgr)); cleanup: isc_task_endexclusive(server->task); return (result); @@ -2208,6 +2230,8 @@ run_server(isc_task_t *task, isc_event_t *event) { CHECKFATAL(load_configuration(ns_g_conffile, server, ISC_TRUE), "loading configuration"); + isc_hash_init(); + CHECKFATAL(load_zones(server, ISC_FALSE), "loading zones"); @@ -2745,7 +2769,7 @@ ns_server_dumpstats(ns_server_t *server) { fprintf(fp, "+++ Statistics Dump +++ (%lu)\n", (unsigned long)now); for (i = 0; i < ncounters; i++) - fprintf(fp, "%s %" ISC_PRINT_QUADFORMAT "d\n", + fprintf(fp, "%s %" ISC_PRINT_QUADFORMAT "u\n", dns_statscounter_names[i], server->querystats[i]); @@ -2766,7 +2790,7 @@ ns_server_dumpstats(ns_server_t *server) { viewname = view->name; for (i = 0; i < ncounters; i++) { fprintf(fp, "%s %" ISC_PRINT_QUADFORMAT - "d %s", + "u %s", dns_statscounter_names[i], zonestats[i], zonename); @@ -2891,11 +2915,11 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) { DNS_ZONESTATE_SOAQUERY); n = snprintf((char *)isc_buffer_used(text), isc_buffer_availablelength(text), - "number of zones: %d\n" + "number of zones: %u\n" "debug level: %d\n" - "xfers running: %d\n" - "xfers deferred: %d\n" - "soa queries in progress: %d\n" + "xfers running: %u\n" + "xfers deferred: %u\n" + "soa queries in progress: %u\n" "query logging is %s\n" "server is up and running", zonecount, ns_g_debuglevel, xferrunning, xferdeferred, |