diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:14:13 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:14:13 -0600 |
commit | 68791e78c00f09ff88fc236d31040d70f6516edf (patch) | |
tree | 4fa2c98b2b701da38e168b71cfe85b7cd171be2d /bin | |
parent | 540716ae8c026fe40704cd6a0c0d0cd530b44a40 (diff) | |
download | bind9-68791e78c00f09ff88fc236d31040d70f6516edf.tar.gz |
9.2.0rc9
Diffstat (limited to 'bin')
-rw-r--r-- | bin/dig/dighost.c | 8 | ||||
-rw-r--r-- | bin/named/client.c | 12 | ||||
-rw-r--r-- | bin/named/controlconf.c | 11 | ||||
-rw-r--r-- | bin/named/log.c | 12 | ||||
-rw-r--r-- | bin/named/xfrout.c | 4 | ||||
-rw-r--r-- | bin/nsupdate/nsupdate.c | 8 | ||||
-rwxr-xr-x | bin/tests/system/ifconfig.sh | 6 |
7 files changed, 38 insertions, 23 deletions
diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 3b346001..95498c28 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.221.2.5 2001/10/15 23:06:07 bwelling Exp $ */ +/* $Id: dighost.c,v 1.221.2.6 2001/10/31 23:04:26 marka Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -1027,9 +1027,9 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) if (!success) { success = ISC_TRUE; lookup_counter++; - cancel_lookup(query->lookup); lookup = requeue_lookup(query->lookup, ISC_FALSE); + cancel_lookup(query->lookup); lookup->doing_xfr = ISC_FALSE; if (!lookup->trace_root && section == DNS_SECTION_ANSWER) @@ -1083,9 +1083,9 @@ next_origin(dns_message_t *msg, dig_query_t *query) { * Then we just did rootorg; there's nothing left. */ return (ISC_FALSE); - cancel_lookup(query->lookup); lookup = requeue_lookup(query->lookup, ISC_TRUE); lookup->origin = ISC_LIST_NEXT(query->lookup->origin, link); + cancel_lookup(query->lookup); return (ISC_TRUE); } @@ -1703,9 +1703,9 @@ connect_timeout(isc_task_t *task, isc_event_t *event) { } else { debug("making new TCP request, %d tries left", l->retries); - cancel_lookup(l); l->retries--; requeue_lookup(l, ISC_TRUE); + cancel_lookup(l); } } else { fputs(l->cmdline, stdout); diff --git a/bin/named/client.c b/bin/named/client.c index f1c07953..81c162cf 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: client.c,v 1.176.2.4 2001/10/12 19:14:47 gson Exp $ */ +/* $Id: client.c,v 1.176.2.5 2001/10/30 01:12:34 marka Exp $ */ #include <config.h> @@ -1478,9 +1478,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) if (result != ISC_R_SUCCESS) goto cleanup_client; isc_task_setname(client->task, "client", client); - result = isc_task_onshutdown(client->task, client_shutdown, client); - if (result != ISC_R_SUCCESS) - goto cleanup_task; client->timer = NULL; result = isc_timer_create(manager->timermgr, isc_timertype_inactive, @@ -1576,12 +1573,19 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) if (result != ISC_R_SUCCESS) goto cleanup_recvevent; + result = isc_task_onshutdown(client->task, client_shutdown, client); + if (result != ISC_R_SUCCESS) + goto cleanup_query; + CTRACE("create"); *clientp = client; return (ISC_R_SUCCESS); + cleanup_query: + ns_query_free(client); + cleanup_recvevent: isc_event_free((isc_event_t **)&client->recvevent); diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 5e4f8d71..2190227c 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: controlconf.c,v 1.28.2.5 2001/10/19 22:29:08 bwelling Exp $ */ +/* $Id: controlconf.c,v 1.28.2.6 2001/10/31 23:00:44 marka Exp $ */ #include <config.h> @@ -25,6 +25,7 @@ #include <isc/file.h> #include <isc/fsaccess.h> #include <isc/mem.h> +#include <isc/net.h> #include <isc/netaddr.h> #include <isc/print.h> #include <isc/random.h> @@ -1168,13 +1169,17 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config, isc_sockaddr_t addr; if (i == 0) { + struct in_addr localhost; + if (isc_net_probeipv4() != ISC_R_SUCCESS) continue; - isc_sockaddr_any(&addr); + localhost.s_addr = htonl(INADDR_LOOPBACK); + isc_sockaddr_fromin(&addr, &localhost, 0); } else { if (isc_net_probeipv6() != ISC_R_SUCCESS) continue; - isc_sockaddr_any6(&addr); + isc_sockaddr_fromin6(&addr, + &in6addr_loopback, 0); } isc_sockaddr_setport(&addr, NS_CONTROL_PORT); diff --git a/bin/named/log.c b/bin/named/log.c index d171666a..361ab83b 100644 --- a/bin/named/log.c +++ b/bin/named/log.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.33 2001/06/14 14:14:17 gson Exp $ */ +/* $Id: log.c,v 1.33.2.1 2001/10/31 22:44:15 marka Exp $ */ #include <config.h> @@ -168,10 +168,12 @@ isc_result_t ns_log_setdefaultcategory(isc_logconfig_t *lcfg) { isc_result_t result; - result = isc_log_usechannel(lcfg, "default_syslog", - ISC_LOGCATEGORY_DEFAULT, NULL); - if (result != ISC_R_SUCCESS) - goto cleanup; + if (! ns_g_logstderr) { + result = isc_log_usechannel(lcfg, "default_syslog", + ISC_LOGCATEGORY_DEFAULT, NULL); + if (result != ISC_R_SUCCESS) + goto cleanup; + } result = isc_log_usechannel(lcfg, "default_debug", ISC_LOGCATEGORY_DEFAULT, NULL); diff --git a/bin/named/xfrout.c b/bin/named/xfrout.c index 63ce0e84..8f4eb2da 100644 --- a/bin/named/xfrout.c +++ b/bin/named/xfrout.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: xfrout.c,v 1.101.2.2 2001/09/28 22:07:12 bwelling Exp $ */ +/* $Id: xfrout.c,v 1.101.2.3 2001/10/30 01:28:29 marka Exp $ */ #include <config.h> @@ -1093,6 +1093,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) { ISC_LOG_DEBUG(4), "IXFR version not in journal, " "falling back to AXFR"); + mnemonic = "AXFR-style IXFR"; goto axfr_fallback; } CHECK(result); @@ -1100,7 +1101,6 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) { axfr_fallback: CHECK(axfr_rrstream_create(mctx, db, ver, &data_stream)); - mnemonic = "AXFR-style IXFR"; } /* diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 467bb579..fefbf141 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.103.2.4 2001/10/15 20:25:57 gson Exp $ */ +/* $Id: nsupdate.c,v 1.103.2.6 2001/11/06 21:50:35 bwelling Exp $ */ #include <config.h> @@ -1089,6 +1089,7 @@ evaluate_zone(char *cmdline) { result = dns_name_fromtext(userzone, &b, dns_rootname, ISC_FALSE, NULL); if (result != ISC_R_SUCCESS) { + userzone = NULL; /* Lest it point to an invalid name */ fprintf(stderr, "could not parse zone name\n"); return (STATUS_SYNTAX); } @@ -1146,6 +1147,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) { goto doneparsing; } } + errno = 0; ttl = strtol(word, &endp, 0); if (*endp != '\0') { if (isdelete) { @@ -1159,7 +1161,9 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) { if (isdelete) ttl = 0; - else if (ttl < 0 || ttl > TTL_MAX || errno == ERANGE) { + else if (ttl < 0 || ttl > TTL_MAX || + (ttl == LONG_MAX && errno == ERANGE)) + { /* * The errno test is needed to catch when strtol() * overflows on a platform where sizeof(int) == diff --git a/bin/tests/system/ifconfig.sh b/bin/tests/system/ifconfig.sh index 21287d35..6da7951b 100755 --- a/bin/tests/system/ifconfig.sh +++ b/bin/tests/system/ifconfig.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: ifconfig.sh,v 1.35 2001/06/14 14:10:32 gson Exp $ +# $Id: ifconfig.sh,v 1.35.2.1 2001/11/05 04:29:35 marka Exp $ # # Set up interface aliases for bind9 system tests. @@ -62,7 +62,7 @@ case "$1" in *-sgi-irix6.*) ifconfig lo0 alias 10.53.0.$ns ;; - *-*-sysv5uw7*) + *-*-sysv5uw[7-8]*) ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff ;; *-ibm-aix4.*) @@ -107,7 +107,7 @@ case "$1" in *-sgi-irix6.*) ifconfig lo0 -alias 10.53.0.$ns ;; - *-*-sysv5uw7*) + *-*-sysv5uw[7-8]*) ifconfig lo0 -alias 10.53.0.$ns ;; *-ibm-aix4.*) |