freebsd kernel with SKQ
Go to file
Luigi Rizzo a8c102a2ec Implement keepalives for dynamic rules, so they will not expire
just because you leave your session idle.

Also, put in a fix for 64-bit architectures (to be revised).

In detail:

ip_fw.h

  * Reorder fields in struct ip_fw to avoid alignment problems on
    64-bit machines. This only masks the problem, I am still not
    sure whether I am doing something wrong in the code or there
    is a problem elsewhere (e.g. different aligmnent of structures
    between userland and kernel because of pragmas etc.)

  * added fields in dyn_rule to store ack numbers, so we can
    generate keepalives when the dynamic rule is about to expire

ip_fw2.c

  * use a local function, send_pkt(), to generate TCP RST for Reset rules;

  * save about 250 bytes by cleaning up the various snprintf()
    in ipfw_log() ...

  * ... and use twice as many bytes to implement keepalives
    (this seems to be working, but i have not tested it extensively).

Keepalives are generated once every 5 seconds for the last 20 seconds
of the lifetime of a dynamic rule for an established TCP flow.  The
packets are sent to both sides, so if at least one of the endpoints
is responding, the timeout is refreshed and the rule will not expire.

You can disable this feature with

        sysctl net.inet.ip.fw.dyn_keepalive=0

(the default is 1, to have them enabled).

MFC after: 1 day

(just kidding... I will supply an updated version of ipfw2 for
RELENG_4 tomorrow).
2002-07-14 23:47:18 +00:00
bin Complain if more than one file argument is given to unlink(1) like we did 2002-07-12 07:20:20 +00:00
contrib MFS: make this file compilable with gcc 2.9x as well. 2002-07-14 13:25:51 +00:00
crypto Use realhostname_sa(3) so the IP address will be used instead of the 2002-07-11 10:36:10 +00:00
etc
games Fix a typo. 2002-07-14 22:50:12 +00:00
gnu The .Nm utility 2002-07-14 15:12:00 +00:00
include clnt_vc_create() has const scalar arguments that wind up being modified, 2002-07-14 23:35:04 +00:00
kerberos5
kerberosIV
lib Fix "rpcinfo -m" when talking to other implementations of rpcbind. 2002-07-14 23:38:37 +00:00
libexec Use fgetln(3) to read lines from configuration files (ftpusers, ftphosts.) 2002-07-12 15:51:15 +00:00
release Add "tty" entry. 2002-07-14 14:18:16 +00:00
sbin The .Nm utility 2002-07-14 14:47:15 +00:00
secure Removed the (never used) help-distribute target from here. 2002-07-11 13:31:52 +00:00
share The .Nm utility 2002-07-14 14:58:11 +00:00
sys Implement keepalives for dynamic rules, so they will not expire 2002-07-14 23:47:18 +00:00
tools
usr.bin WARNS=4 2002-07-14 18:23:22 +00:00
usr.sbin The .Nm utility 2002-07-14 14:47:15 +00:00
COPYRIGHT
MAINTAINERS
Makefile
Makefile.inc1 Pass -DBOOTSTRAPPING to the kernel's build tool (sys/dev/aic7xxx/aicasm). 2002-07-11 16:43:59 +00:00
Makefile.upgrade
README
UPDATING

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

kerberosIV	KerberosIV (eBones) 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