freebsd with flexible iflib nic queues
Go to file
Ruslan Ermilov 40e7fc1a20 More potential buffer overflow fixes.
o Fixed `nfrontp' calculations in output_data().  If `remaining' is
  initially zero, it was possible for `nfrontp' to be decremented.

Noticed by:	dillon

o Replaced leaking writenet() with output_datalen():

:  * writenet
:  *
:  * Just a handy little function to write a bit of raw data to the net.
:  * It will force a transmit of the buffer if necessary
:  *
:  * arguments
:  *    ptr - A pointer to a character string to write
:  *    len - How many bytes to write
:  */
: 	void
: writenet(ptr, len)
: 	register unsigned char *ptr;
: 	register int len;
: {
: 	/* flush buffer if no room for new data) */
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 	if ((&netobuf[BUFSIZ] - nfrontp) < len) {
: 		/* if this fails, don't worry, buffer is a little big */
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 		netflush();
: 	}
:
: 	memmove(nfrontp, ptr, len);
: 	nfrontp += len;
:
: }  /* end of writenet */

What an irony!  :-)

o Optimized output_datalen() a bit.
2001-07-20 12:02:30 +00:00
bin Fix style bugs introduced by rev 1.28. No functional changes. 2001-07-16 15:49:58 +00:00
contrib More potential buffer overflow fixes. 2001-07-20 12:02:30 +00:00
crypto More potential buffer overflow fixes. 2001-07-20 12:02:30 +00:00
etc - Avoid to select an interface which is not good for RA/RS. 2001-07-19 12:37:22 +00:00
games Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
gnu Add lbasename which is used in the `LD' fix for -current. 2001-07-20 03:53:28 +00:00
include Implement pthread_attr_[gs]etguardsize(). Non-default-size stacks used to 2001-07-20 04:23:11 +00:00
kerberos5 add dependency for lex.o on roken.h (from "Alexander N. Kabaev" 2001-07-12 08:36:01 +00:00
kerberosIV generate ksrvtgt 2001-06-16 06:51:35 +00:00
lib Implement pthread_attr_[gs]etguardsize(). Non-default-size stacks used to 2001-07-20 04:23:11 +00:00
libexec Portability configuration data for LukeM ftpd. 2001-07-19 17:45:14 +00:00
release freebsd.org -> FreeBSD.org 2001-07-19 18:14:56 +00:00
sbin Perform a major cleanup of the usr.sbin Makefiles. 2001-07-20 06:20:32 +00:00
secure Added missing DPADD and CLEANFILES. 2001-07-12 09:17:51 +00:00
share Implement pthread_attr_[gs]etguardsize(). Non-default-size stacks used to 2001-07-20 04:23:11 +00:00
sys We haven't used this for ages, and we're not going to either. 2001-07-20 09:44:55 +00:00
tools ISO_ -> ISO 2001-06-11 01:29:40 +00:00
usr.bin o Integrate security enhancements from OpenBSD. 2001-07-19 21:25:10 +00:00
usr.sbin Fix a possible NULL reference that would be triggered 2001-07-20 06:46:48 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Make it possible to build manpages for the entire source tree. 2001-03-27 08:43:28 +00:00
Makefile.inc1 Axe S/Key. OPIE is the true and faithful successor. 2001-07-09 17:49:34 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README Slightly improve the description of "crypto". "DES" is a subset of 2000-08-31 17:59:01 +00:00
UPDATING Mention problems with PAM upgrade and ports. 2001-07-17 08:01:25 +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, 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/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 have to build
world before.  More information is available in the handbook.

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

kerberosIV	Kerberos 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/handbook/synching.html