From: Pekka Riikonen Date: Tue, 9 Mar 2004 15:42:49 +0000 (+0000) Subject: Use the sock for checking maximum number of conns in General X-Git-Tag: silc.server.0.9.19~85 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a163ae03e036b82de1c11a93fa47f05683c90710 Use the sock for checking maximum number of conns in General case, after all. --- diff --git a/CHANGES b/CHANGES index 6fb84779..c30eed16 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ Tue Mar 9 17:11:58 EET 2004 Pekka Riikonen server is full. Affected files are silcd/server.c, server_internal.h and silcd.c. + * Clarified the connections_max meaning in General section + in doc/example_silcd.conf.in. + Wed Mar 3 15:13:49 CET 2004 Pekka Riikonen * Fixed crashbug in connection closing, after a protocol diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 68686e03..b8112b3b 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -1726,7 +1726,7 @@ SILC_TASK_CALLBACK(silc_server_accept_new_connection) } /* Check for maximum allowed connections */ - if (server->stat.conn_num > server->config->param.connections_max) { + if (sock > server->config->param.connections_max) { SILC_LOG_ERROR(("Refusing connection, server is full")); server->stat.conn_failures++; silc_net_close_connection(sock); diff --git a/doc/example_silcd.conf.in b/doc/example_silcd.conf.in index 2610cb23..a5312e24 100644 --- a/doc/example_silcd.conf.in +++ b/doc/example_silcd.conf.in @@ -48,8 +48,9 @@ General { # without FQDN cannot connect to the server. #require_reverse_lookup = true; - # Maximum number of incoming connections allowed to this server. - # If more attempt to connect they will be refused. + # Maximum number of connections server can handle. If you want + # to limit the number of incoming connections, define the + # connections_max in the ConnectionParams. connections_max = 1000; # Maximum number of incoming connections allowed per single host.