diff options
author | dg <dg@FreeBSD.org> | 1998-05-19 14:04:36 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1998-05-19 14:04:36 +0000 |
commit | 5f8a4130d8dd1d4441beb5fba01ab53b331a9111 (patch) | |
tree | aaed0538d112feb998dd062f62a7e8e220668f46 /sys/netinet/ip_fw.c | |
parent | c3415a2524903047d0a79dad7753c33f98e0f235 (diff) | |
download | FreeBSD-src-5f8a4130d8dd1d4441beb5fba01ab53b331a9111.zip FreeBSD-src-5f8a4130d8dd1d4441beb5fba01ab53b331a9111.tar.gz |
Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> via
NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and
minorly tweaked by me.
This is a standard part of FreeBSD, but must be enabled with:
"sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must
also be enabled. This should probably be modified to use the zone
allocator for speed and space efficiency. The current algorithm also
appears to lose if the number of active paths exceeds IPFLOW_MAX (256),
in which case it wastes lots of time trying to figure out which cache
entry to drop.
Diffstat (limited to 'sys/netinet/ip_fw.c')
-rw-r--r-- | sys/netinet/ip_fw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 6d2614a..bcdfda0 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -12,7 +12,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_fw.c,v 1.81 1998/04/15 17:46:51 bde Exp $ + * $Id: ip_fw.c,v 1.82 1998/04/21 18:54:53 julian Exp $ */ /* @@ -36,6 +36,7 @@ #include <sys/socket.h> #include <sys/sysctl.h> #include <net/if.h> +#include <net/route.h> #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> |