From 43ee20a821c490fa5bb43df924e9970705c22ecf Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Tue, 12 Nov 2002 23:38:12 +0000 Subject: [PATCH] merge rt4112 --- bin/named/config.c | 3 ++- bin/named/include/named/globals.h | 4 +++- bin/named/interfacemgr.c | 4 ++-- bin/named/server.c | 12 +++++++++++- doc/arm/Bv9ARM-book.xml | 12 +++++++++++- doc/private/branches | 2 +- lib/isccfg/namedconf.c | 3 ++- 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/bin/named/config.c b/bin/named/config.c index 53daa9465f..bf9bb5a6e8 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.c,v 1.32 2002/09/10 04:45:52 marka Exp $ */ +/* $Id: config.c,v 1.33 2002/11/12 23:38:10 explorer Exp $ */ #include @@ -80,6 +80,7 @@ options {\n\ statistics-file \"named.stats\";\n\ statistics-interval 60;\n\ tcp-clients 100;\n\ + tcp-listen-queue 3;\n\ # tkey-dhkey \n\ # tkey-gssapi-credential \n\ # tkey-domain \n\ diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h index 1080588720..87f9521d17 100644 --- a/bin/named/include/named/globals.h +++ b/bin/named/include/named/globals.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: globals.h,v 1.59 2001/08/08 20:37:31 gson Exp $ */ +/* $Id: globals.h,v 1.60 2002/11/12 23:38:11 explorer Exp $ */ #ifndef NAMED_GLOBALS_H #define NAMED_GLOBALS_H 1 @@ -107,6 +107,8 @@ EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR "/run/lwresd.pid"); EXTERN const char * ns_g_username INIT(NULL); +EXTERN int ns_g_listen INIT(3); + #undef EXTERN #undef INIT diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c index b02420b4a7..d83cb31028 100644 --- a/bin/named/interfacemgr.c +++ b/bin/named/interfacemgr.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: interfacemgr.c,v 1.74 2002/10/31 04:08:22 marka Exp $ */ +/* $Id: interfacemgr.c,v 1.75 2002/11/12 23:38:10 explorer Exp $ */ #include @@ -304,7 +304,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) { isc_result_totext(result)); goto tcp_bind_failure; } - result = isc_socket_listen(ifp->tcpsocket, 3); + result = isc_socket_listen(ifp->tcpsocket, ns_g_listen); if (result != ISC_R_SUCCESS) { isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR, "listening on TCP socket: %s", diff --git a/bin/named/server.c b/bin/named/server.c index 887df5d397..ee0021d821 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.389 2002/09/11 04:32:29 marka Exp $ */ +/* $Id: server.c,v 1.390 2002/11/12 23:38:11 explorer Exp $ */ #include @@ -1787,6 +1787,16 @@ load_configuration(const char *filename, ns_server_t *server, else CHECKM(ns_config_getport(config, &listen_port), "port"); + /* + * Find the listen queue depth. + */ + obj = NULL; + result = ns_config_get(maps, "tcp-listen-queue", &obj); + INSIST(result == ISC_R_SUCCESS); + ns_g_listen = cfg_obj_asuint32(obj); + if (ns_g_listen < 3) + ns_g_listen = 3; + /* * Configure the interface manager according to the "listen-on" * statement. diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 1ddfcbd112..7921e84926 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ - + BIND 9 Administrator Reference Manual @@ -2884,6 +2884,7 @@ statement in the named.conf file: recursive-clients number; serial-query-rate number; serial-queries number; + tcp-listen-queue number; transfer-format ( one-answer | many-answers ); transfers-in number; transfers-out number; @@ -3852,6 +3853,15 @@ records are purged from the cache only when their TTLs expire. +tcp-listen-queue +The listen queue depth. The default and minimum is 3. +If the kernel supports the accept filter "dataready" this also controls how +many TCP connections that will be queued in kernel space waiting for +some data before being passed to accept. Values less than 3 will be +silently raised. + + + diff --git a/doc/private/branches b/doc/private/branches index c14f820145..3d5374b4d7 100644 --- a/doc/private/branches +++ b/doc/private/branches @@ -9,7 +9,7 @@ rt3625 closed explorer rt3746 open marka rt3892 closed explorer rt4090 closed explorer -rt4112 review explorer +rt4112 closed explorer adb_race review explorer rt4319 review explorer rt3907 review explorer diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 99c5f26b77..b7aeccfd39 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: namedconf.c,v 1.9 2002/09/10 04:45:54 marka Exp $ */ +/* $Id: namedconf.c,v 1.10 2002/11/12 23:38:12 explorer Exp $ */ #include @@ -502,6 +502,7 @@ options_clauses[] = { { "statistics-file", &cfg_type_qstring, 0 }, { "statistics-interval", &cfg_type_uint32, CFG_CLAUSEFLAG_NYI }, { "tcp-clients", &cfg_type_uint32, 0 }, + { "tcp-listen-queue", &cfg_type_uint32, 0 }, { "tkey-dhkey", &cfg_type_tkey_dhkey, 0 }, { "tkey-gssapi-credential", &cfg_type_qstring, 0 }, { "tkey-domain", &cfg_type_qstring, 0 },