1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
John Polstra e2e3d0a401 For the TCP transport, put the listening socket in non-blocking
mode.  This addresses a well-known race condition that can cause
servers to hang in accept().  The relevant case is when somebody
connects to the server and then immediately kills the connection
by sending a TCP reset.  On the server this causes select to report
a ready condition on the socket, after which the accept call blocks
because there is no longer any pending connection to accept.

In -current there is already a work-around for this in the kernel.
It was merged into -stable some time ago, but then David Greenman
reverted it because it seemed to be causing a socket leak in some
cases.  (See uipc_socket.c revision 1.51.2.3.)  Hence this userland
fix is needed in -stable, and I plan to merge it into that branch
soon because it fixes a potential DoS attack.  It may also be needed
in -current if the suspected socket leak turns out to be real.  In
any case, after thinking it over I believe the fix belongs in
userland.  An application shouldn't assume that a ready return from
select guarantees that the subsequent I/O operation cannot block.
A lot can happen between the select and the accept.

A similar fix should most likely be applied to the Unix domain
socket transport too.

Submitted by:	peter
Reviewed by:	jdp
1999-11-18 03:01:06 +00:00
bin The pipleline problem introduced in version 1.22 wasn't fully fixed in 1999-11-17 16:53:34 +00:00
contrib * Remove a trailing ";" from a macro. 1999-11-17 07:18:25 +00:00
crypto Merge anf fix for build. 1999-09-19 21:56:09 +00:00
etc Add the entry for usb (as opposed to usb<number>). It's minor is equivalent 1999-11-17 23:02:34 +00:00
games Fix breakage in previous commit. 1999-11-16 12:10:29 +00:00
gnu Build genrtl.h before print-rtl.o. 1999-11-17 15:50:45 +00:00
include Add missing netinet6. 1999-11-05 18:49:00 +00:00
kerberos5 Bring in SRA for telnet. 1999-10-07 18:59:55 +00:00
kerberosIV Bring in SRA for telnet. 1999-10-07 18:59:55 +00:00
lib For the TCP transport, put the listening socket in non-blocking 1999-11-18 03:01:06 +00:00
libexec Fix bootpd for Alpha. 1999-11-12 10:11:48 +00:00
release Remove obsolete token ring support comments. 1999-11-12 19:28:48 +00:00
sbin Allow octal or hex input. 1999-11-17 23:42:09 +00:00
secure Dont build telenet if we are going for kerberised telnet; this just 1999-10-12 19:48:05 +00:00
share Fix invalid option name: DIVERT -> IPDIVERT 1999-11-17 12:34:35 +00:00
sys fix up a whitespace screwup I made. 1999-11-18 01:23:06 +00:00
tools Bring ``ac'' into reality. This great tools now works correctly (for 1999-11-04 08:45:02 +00:00
usr.bin purity change for name length checking code 1999-11-17 20:51:35 +00:00
usr.sbin Fix ``set proctitle'' by using setproctitle(). 1999-11-17 21:12:35 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Remove a comment about setting objformat to elf by default. We've 1999-09-18 08:27:55 +00:00
Makefile.inc0 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Makefile.inc1 Remove CROSS_MAKE_FLAGS. 1999-11-15 17:07:45 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
UPDATING gcc 2.95.2 1999-11-17 18:06:56 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html