Limit the number of TCP connections that will be handled at one time.
authorKen Raeburn <raeburn@mit.edu>
Fri, 27 Sep 2002 03:38:33 +0000 (03:38 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 27 Sep 2002 03:38:33 +0000 (03:38 +0000)
commit16f8791b67032adfc3282675a4d40f60acd0e58d
treee208d3e220776cef066313086efa4e5a537ad283
parent6fdb6b2c9aceecd8e05a81aee0ed0cf51710309e
Limit the number of TCP connections that will be handled at one time.
Remove some debugging calls.

* network.c (struct connection): New field start_time.
(tcp_data_counter, max_tcp_data_connections): New variables.
(kill_tcp_connection): New function.
(process_tcp_connection): Use it.  Log reason for rejecting connection if the
requested buffer size is too large.
(accept_tcp_connection): If there are too many TCP connections already, shut
down the oldest one.
(setup_network, listen_and_process, process_tcp_connection, service_conn):
Delete debugging code.
(process_packet): Use socklen_t where appropriate.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14903 dc483132-0cff-0310-8789-dd5450dbe970
src/kdc/ChangeLog
src/kdc/network.c