FreeBSD src
Go to file
Robert Watson d4b509bd7f Until this change, the UDP input code used global variables udp_in,
udp_in6, and udp_ip6 to pass socket address state between udp_input(),
udp_append(), and soappendaddr_locked().  While file in the default
configuration, when running with multiple netisrs or direct ithread
dispatch, this can result in races wherein user processes using
recvmsg() get back the wrong source IP/port.  To correct this and
related races:

- Eliminate udp_ip6, which is believed to be generated but then never
  used.  Eliminate ip_2_ip6_hdr() as it is now unneeded.

- Eliminate setting, testing, and existence of 'init' status fields
  for the IPv6 structures.  While with multiple UDP delivery this
  could lead to amortization of IPv4 -> IPv6 conversion when
  delivering an IPv4 UDP packet to an IPv6 socket, it added
  substantial complexity and side effects.

- Move global structures into the stack, declaring udp_in in
  udp_input(), and udp_in6 in udp_append() to be used if a conversion
  is required.  Pass &udp_in into udp_append().

- Re-annotate comments to reflect updates.

With this change, UDP appears to operate correctly in the presence of
substantial inbound processing parallelism.  This solution avoids
introducing additional synchronization, but does increase the
potential stack depth.

Discovered by:	kris (Bug Magnet)
MFC after:	3 weeks
2004-11-04 01:25:23 +00:00
bin Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
contrib Fix some more files that got butchered to appear to be back on the 2004-10-21 20:10:14 +00:00
crypto Better Xlist command line. 2004-10-28 16:13:28 +00:00
etc Sort files properly. 2004-11-02 12:35:54 +00:00
games Never be afraid to try something new. Remember, amateurs built the ark. 2004-10-27 20:28:56 +00:00
gnu For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
include For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
kerberos5 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
lib Save cancelflags in signal frame, this fixes a problem that 2004-11-01 10:49:34 +00:00
libexec Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
release Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
rescue For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
sbin Be more clear that "bridged" is a synonym for "layer2". 2004-11-03 21:51:34 +00:00
secure Update for OpenSSH 3.9p1. 2004-10-28 16:04:23 +00:00
share Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
sys Until this change, the UDP input code used global variables udp_in, 2004-11-04 01:25:23 +00:00
tools Add a small regression test that opens a TCP socket, listens on it, 2004-11-02 17:59:12 +00:00
usr.bin Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
usr.sbin Allow the -f argument to work. 2004-11-03 20:45:52 +00:00
COPYRIGHT
installworld_newk
installworld_oldk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
MAINTAINERS Remove vinum from the list. I no longer have the time and energy to 2004-09-08 02:08:33 +00:00
Makefile Fixed MAKEOBJDIRPREFIX variable type check in case the env(1) 2004-10-18 17:47:31 +00:00
Makefile.inc1 For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Remove RFC1644 T/TCP support from the TCP side of the network stack. 2004-11-02 22:22:22 +00:00
UPDATING.64BTT

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, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  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 is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/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 NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


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

contrib		Packages contributed by 3rd parties.

crypto		Cryptography 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.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

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/doc/en_US.ISO8859-1/books/handbook/synching.html