freebsd-nq/sys
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
..
alpha o Complete the locking of page queue accesses by vm_page_unwire(). 2002-07-13 20:55:21 +00:00
amd64 o Lock page queue accesses by vm_page_wire(). 2002-07-14 20:24:40 +00:00
arm Remove label_t and physadr, which seem to have never been used in 2002-07-10 15:47:59 +00:00
boot The .Nm bootloader 2002-07-14 15:22:49 +00:00
cam Correct spelling of 'supplied'. 2002-06-19 20:44:48 +00:00
coda More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
compat Move the switch statement labels for the explicit 64-bit 2002-07-09 19:25:43 +00:00
conf Quick fix for high resolution kernel profiling on i386's. Use 2002-07-13 22:28:34 +00:00
contrib Resolve conflicts arising from the ACPI CA 20020611 import. 2002-07-09 17:54:02 +00:00
crypto Fixed AES encryption algorithm bug 2002-05-24 07:26:17 +00:00
ddb Part 1 of KSE-III 2002-06-29 17:26:22 +00:00
dev o Lock page queue accesses by vm_page_wire(). 2002-07-14 20:40:32 +00:00
fs - Change all LK_SHARE locks to LK_EXCLUSIVE. Shared locks aren't quite safe 2002-07-09 19:43:39 +00:00
geom Don't use the static thread.. it is going away. 2002-06-29 07:47:20 +00:00
gnu Use hashdestroy() now that it exists. 2002-06-30 03:01:44 +00:00
i4b Remote pci.h/NPCI usage from i4b code. 2002-06-13 06:04:28 +00:00
i386 o Lock page queue accesses by vm_page_wire(). 2002-07-14 20:24:40 +00:00
ia64 o Lock page queue accesses by vm_page_wire(). 2002-07-14 23:31:04 +00:00
isa Clock frequencies reported by sysctl should be unsigned values. Discovered 2002-06-22 16:30:18 +00:00
isofs/cd9660 Quick fix for non-unique inode numbers for hard links. We use the 2002-05-22 08:50:18 +00:00
kern o Lock page queue accesses by vm_page_wire(). 2002-07-14 19:45:46 +00:00
libkern For some reason this didn't get added in my previous commit. 2002-05-29 21:58:12 +00:00
modules Resolve conflicts arising from the ACPI CA 20020611 import. 2002-07-09 17:54:02 +00:00
net Add some additional 802.11 media definitions. 2002-07-14 21:58:19 +00:00
netatalk Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netatm - Remove UM_* user land memory macros since they are no longer used. 2002-06-24 22:31:17 +00:00
netgraph NUL terminate the ACNAME passed to userland. 2002-06-22 21:00:53 +00:00
netinet Implement keepalives for dynamic rules, so they will not expire 2002-07-14 23:47:18 +00:00
netinet6 Notify functions can destroy the pcb, so they have to return an 2002-06-14 08:35:21 +00:00
netipx Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netkey - fixed the order of searching SA table for packets. 2002-07-10 16:39:38 +00:00
netnatm Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netncp Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
netns Fix bug which has been there since rev 1.1 where && was used instead of &. 2002-06-09 03:57:34 +00:00
netsmb Back out my lats commit of locking down a socket, it conflicts with hsu's work. 2002-05-31 11:52:35 +00:00
nfs
nfsclient Convert old style (type foo *)0 casts to NULLs 2002-07-11 17:54:58 +00:00
nfsserver Convert old style (type foo *)0 casts to NULLs 2002-07-11 17:54:58 +00:00
pc98 MFi386: sys/i386/i386/machdep.c revision 1.522. 2002-07-14 09:33:26 +00:00
pccard Rearrange previous commit that passed the vendor id to the kernel in a way 2002-07-14 06:47:52 +00:00
pci o Lock page queue accesses by vm_page_wire(). 2002-07-14 20:40:32 +00:00
posix4 Part 1 of KSE-III 2002-06-29 17:26:22 +00:00
powerpc Add additional cred_free_thread() calls that I had missed the first time. 2002-07-13 04:36:50 +00:00
rpc
security/lomac Get rid of warnings, there's no need to do preprocessor concatination of 2002-06-01 18:45:33 +00:00
sparc64 o Lock page queue accesses by vm_page_wire(). 2002-07-14 23:23:47 +00:00
sys Thinking about it I came to the conclusion that the KSE states were incorrectly 2002-07-14 03:43:33 +00:00
tools - Use 'options DEBUG_VFS_LOCKS' instead of the DEBUG_ALL_VFS_LOCKS 2002-07-07 06:39:36 +00:00
ufs Fix a type: s/your are/you are/ 2002-07-12 19:56:31 +00:00
vm o Lock page queue accesses by vm_page_wire(). 2002-07-14 19:36:15 +00:00
Makefile Milestone #1 in cross-arch make releases. 2002-04-26 17:55:27 +00:00