freebsd-dev/lib
Bill Paul a6e95b4420 Improve DoS avoidance in RPC stream oriented transports. The TCP transport
uses readtcp() to gather data from the network; readtcp() uses select(),
with a timeout of 35 seconds. The problem with this is that if you
connect to a TCP server, send two bytes of data, then just pause, the
server will remain blocked in readtcp() for up to 35 seconds, which is
sort of a long time. If you keep doing this every 35 seconds, you can
keep the server occupied indefinitely.

To fix this, I modified readtcp() (and its cousin, readunix() in svc_unix.c)
to monitor all service transport handles instead of just the current socket.
This allows the server to keep handling new connections that arrive while
readtcp() is running. This prevents one client from potentially monopolizing
a server.

Also, while I was here, I fixed a bug in the timeout calculations. Someone
attempted to adjust the timeout so that if select() returned EINTR and the
loop was restarted, the timeout would be reduced so that rather than waiting
for another 35 seconds, you could never wait for more than 35 seconds total.
Unfortunately, the calculation was wrong, and the timeout could expire much
sooner than 35 seconds.
1998-05-18 16:12:13 +00:00
..
compat Add libg++ 3.0 1997-04-03 06:08:28 +00:00
csu Force BOOTSTRAP mode all the time while the headers are broken on alpha 1998-05-04 02:06:09 +00:00
libalias o Support a compile-time -DNO_FW_PUNCH for portability 1998-04-19 21:42:07 +00:00
libbind Build libbind for named and friends (not installed in /usr/lib) 1998-05-03 05:04:21 +00:00
libc Improve DoS avoidance in RPC stream oriented transports. The TCP transport 1998-05-18 16:12:13 +00:00
libc_r Treat the lock value as volatile. 1998-05-05 21:47:58 +00:00
libcalendar .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libcom_err Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
libcompat .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libcrypt When compiling under elf, use correct library naming conventions. Also 1997-09-05 12:12:35 +00:00
libcurses .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libdisk Change an arbitarly hardcoded `10' to MAX_NO_DISKS, which is currently "20". 1998-05-15 21:17:01 +00:00
libedit .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libf2c Resurrect exit.c 1998-04-29 22:43:18 +00:00
libF77 Resurrect exit.c 1998-04-29 22:43:18 +00:00
libftpio Correctly figure out that the remove cannot do passive mode. 1998-04-11 07:28:53 +00:00
libgnumalloc Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
libI77 Upgrade to the 1997/02/26 version. 1997-04-13 01:16:58 +00:00
libipx -I${DESTDIR}/sys -> -I${.CURDIR}/../../sys. 1997-08-26 14:13:02 +00:00
libkse Treat the lock value as volatile. 1998-05-05 21:47:58 +00:00
libkvm Fixed bugs in the conversion of kvm to to use procfs in rev.1.3. All 1998-01-16 16:45:05 +00:00
libm This commit was generated by cvs2svn to compensate for changes in r27180, 1997-07-03 03:28:27 +00:00
libmd Split the padding out into a separate function. 1998-03-27 10:23:00 +00:00
libmytinfo When printf'ing the result of pointer arithmetic, cast the result to 1998-01-13 03:07:10 +00:00
libncurses Low level use of 'vidattr()' can cause a NULL pointer to be 1998-05-15 21:35:53 +00:00
libopie Move locks from /etc/opielocks to /var/run/opielocks to keep 1997-10-01 13:02:20 +00:00
libpam/modules .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 07:48:45 +00:00
libpcap Simplified by using new yacc rules. 1998-05-08 06:43:07 +00:00
libpthread Treat the lock value as volatile. 1998-05-05 21:47:58 +00:00
libresolv Yet another attempt to remove the old libraries correctly. libfoo.* 1996-10-08 20:06:41 +00:00
librpcsvc Don't add non-generated sources to CLEANFILES. There was no problem 1998-02-25 01:30:05 +00:00
libscsi -I${DESTDIR}/sys -> -I${.CURDIR}/../../sys. 1997-08-26 14:13:02 +00:00
libskey Add warning about interaction of S/Key and login(1) for users without S/Key 1998-05-18 09:36:31 +00:00
libss Remove a 'const' because it was getting thrown away anyway. 1998-05-10 23:48:18 +00:00
libtcl Regenerate (install tclAppInit.c in the installhdrs step). 1998-03-23 13:21:35 +00:00
libtelnet Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
libtermcap The __set_ospeed() function is coded against the speed_t type declared 1998-05-05 21:54:26 +00:00
libutil Oops, revert part of a diff that wasn't supposed to have been committed. 1998-04-28 07:02:33 +00:00
libvgl .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libxpg4 This library builds from libc source, so it also needs to know what 1998-05-18 04:41:07 +00:00
liby Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
libz Backup out the last commit, it was already there. 1998-04-17 08:31:07 +00:00
msun There is no alpha asm code like on i386, so all the functions that 1998-05-10 23:46:01 +00:00
ncurses/ncurses Renamed the generated include file keys.tries to keys.tries.h so 1998-03-20 16:50:08 +00:00
Makefile libtcl now builds (with lots of pointer to int cast warnings) on alpha. 1998-05-13 22:54:03 +00:00
Makefile.inc