/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: interfacemgr.c,v 1.91 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: interfacemgr.c,v 1.92 2008/07/22 23:47:04 tbox Exp $ */
/*! \file */
mgr->generation = 1;
mgr->listenon4 = NULL;
mgr->listenon6 = NULL;
-
+
ISC_LIST_INIT(mgr->interfaces);
ISC_LIST_INIT(mgr->listenon);
goto tcp_listen_failure;
}
- /*
+ /*
* If/when there a multiple filters listen to the
* result.
*/
static isc_boolean_t
listenon_is_ip6_any(ns_listenelt_t *elt) {
- REQUIRE(elt && elt->acl);
- return dns_acl_isany(elt->acl);
+ REQUIRE(elt && elt->acl);
+ return dns_acl_isany(elt->acl);
}
static isc_result_t
setup_locals(ns_interfacemgr_t *mgr, isc_interface_t *interface) {
isc_result_t result;
unsigned int prefixlen;
- isc_netaddr_t *netaddr;
+ isc_netaddr_t *netaddr;
+
+ netaddr = &interface->address;
- netaddr = &interface->address;
-
- /* First add localhost address */
+ /* First add localhost address */
prefixlen = (netaddr->family == AF_INET) ? 32 : 128;
- result = dns_iptable_addprefix(mgr->aclenv.localhost->iptable,
- netaddr, prefixlen, ISC_TRUE);
+ result = dns_iptable_addprefix(mgr->aclenv.localhost->iptable,
+ netaddr, prefixlen, ISC_TRUE);
if (result != ISC_R_SUCCESS)
return (result);
- /* Then add localnets prefix */
+ /* Then add localnets prefix */
result = isc_netaddr_masktoprefixlen(&interface->netmask,
&prefixlen);
"localnets ACL: %s",
interface->name,
isc_result_totext(result));
- return (ISC_R_SUCCESS);
+ return (ISC_R_SUCCESS);
}
- result = dns_iptable_addprefix(mgr->aclenv.localnets->iptable,
- netaddr, prefixlen, ISC_TRUE);
+ result = dns_iptable_addprefix(mgr->aclenv.localnets->iptable,
+ netaddr, prefixlen, ISC_TRUE);
if (result != ISC_R_SUCCESS)
return (result);
static void
setup_listenon(ns_interfacemgr_t *mgr, isc_interface_t *interface,
in_port_t port)
-{
+{
isc_sockaddr_t *addr;
isc_sockaddr_t *old;
old != NULL;
old = ISC_LIST_NEXT(old, link))
if (isc_sockaddr_equal(addr, old))
- break;
+ break;
if (old != NULL)
isc_mem_put(mgr->mctx, addr, sizeof(*addr));
{
isc_interface_t interface;
ns_listenlist_t *ll;
- unsigned int family;
+ unsigned int family;
result = isc_interfaceiter_current(iter, &interface);
if (result != ISC_R_SUCCESS)
UNEXPECTED_ERROR(__FILE__, __LINE__,
"interface iteration failed: %s",
isc_result_totext(result));
- else
+ else
result = ISC_R_SUCCESS;
cleanup_iter:
isc_interfaceiter_destroy(&iter);
/*
* Warn if we are not listening on any interface, unless
- * we're in lwresd-only mode, in which case that is to
+ * we're in lwresd-only mode, in which case that is to
* be expected.
*/
if (ext_listen == NULL &&
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwresd.c,v 1.56 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: lwresd.c,v 1.57 2008/07/22 23:47:04 tbox Exp $ */
-/*! \file
+/*! \file
* \brief
* Main program for the Lightweight Resolver Daemon.
*
for (i = 0; i < lwc->searchnxt; i++) {
CHECK(buffer_putstr(&b, "\t\t\""));
CHECK(buffer_putstr(&b, lwc->search[i]));
- CHECK(buffer_putstr(&b, "\";\n"));
+ CHECK(buffer_putstr(&b, "\";\n"));
}
CHECK(buffer_putstr(&b, "\t};\n"));
}
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rndc.c,v 1.119 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: rndc.c,v 1.120 2008/07/22 23:47:04 tbox Exp $ */
/*! \file */
usage(int status) {
fprintf(stderr, "\
Usage: %s [-c config] [-s server] [-p port]\n\
- [-k key-file ] [-y key] [-V] command\n\
+ [-k key-file ] [-y key] [-V] command\n\
\n\
command is one of the following:\n\
\n\
Retransfer a single zone without checking serial number.\n\
freeze Suspend updates to all dynamic zones.\n\
freeze zone [class [view]]\n\
- Suspend updates to a dynamic zone.\n\
+ Suspend updates to a dynamic zone.\n\
thaw Enable updates to all dynamic zones and reload them.\n\
thaw zone [class [view]]\n\
- Enable updates to a frozen dynamic zone and reload it.\n\
+ Enable updates to a frozen dynamic zone and reload it.\n\
notify zone [class [view]]\n\
Resend NOTIFY messages for the zone.\n\
reconfig Reload configuration file and new zones only.\n\
result = isc_sockaddr_frompath(&serveraddrs[nserveraddrs],
host);
if (result == ISC_R_SUCCESS)
- nserveraddrs++;
+ nserveraddrs++;
} else {
count = SERVERADDRS - nserveraddrs;
result = bind9_getaddresses(host, port,
(void)cfg_map_get(config, "server", &servers);
if (servers != NULL) {
for (elt = cfg_list_first(servers);
- elt != NULL;
+ elt != NULL;
elt = cfg_list_next(elt))
{
const char *name;
else {
DO("get config key list", cfg_map_get(config, "key", &keys));
for (elt = cfg_list_first(keys);
- elt != NULL;
+ elt != NULL;
elt = cfg_list_next(elt))
{
key = cfg_listelt_value(elt);
get_addresses(name, (in_port_t) myport);
else
fprintf(stderr, "too many address: "
- "%s: dropped\n", name);
+ "%s: dropped\n", name);
continue;
}
sa = *cfg_obj_assockaddr(address);
case 'y':
keyname = isc_commandline_argument;
break;
-
+
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
default:
fprintf(stderr, "%s: unhandled option -%c\n",
program, isc_commandline_option);
- exit(1);
+ exit(1);
}
}
logdest.file.maximum_size = 0;
DO("creating log channel",
isc_log_createchannel(logconfig, "stderr",
- ISC_LOG_TOFILEDESC, ISC_LOG_INFO, &logdest,
+ ISC_LOG_TOFILEDESC, ISC_LOG_INFO, &logdest,
ISC_LOG_PRINTTAG|ISC_LOG_PRINTLEVEL));
DO("enabling log channel", isc_log_usechannel(logconfig, "stderr",
NULL, NULL));
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sig0_test.c,v 1.16 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: sig0_test.c,v 1.17 2008/07/22 23:47:04 tbox Exp $ */
#include <config.h>
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sock_test.c,v 1.53 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: sock_test.c,v 1.54 2008/07/22 23:47:04 tbox Exp $ */
#include <config.h>
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: xfrin.c,v 1.158 2008/07/22 03:43:04 marka Exp $ */
+/* $Id: xfrin.c,v 1.159 2008/07/22 23:47:04 tbox Exp $ */
/*! \file */
axfr_init(dns_xfrin_ctx_t *xfr) {
isc_result_t result;
- xfr->is_ixfr = ISC_FALSE;
+ xfr->is_ixfr = ISC_FALSE;
if (xfr->db != NULL)
dns_db_detach(&xfr->db);
CHECK(dns_message_renderend(msg));
result = ISC_R_SUCCESS;
failure:
- if (cleanup_cctx)
- dns_compress_invalidate(&cctx);
+ if (cleanup_cctx)
+ dns_compress_invalidate(&cctx);
return (result);
}
if (msecs == 0)
msecs = 1;
persec = (xfr->nbytes * 1000) / msecs;
- xfrin_log(xfr, ISC_LOG_INFO,
+ xfrin_log(xfr, ISC_LOG_INFO,
"Transfer completed: %d messages, %d records, "
"%" ISC_PRINT_QUADFORMAT "u bytes, "
"%u.%03u secs (%u bytes/sec)",