1
linux/include/net/netfilter
Patrick McHardy a71c085562 [NETFILTER]: nf_conntrack: use hashtable for expectations
Currently all expectations are kept on a global list that

- needs to be searched for every new conncetion
- needs to be walked for evicting expectations when a master connection
  has reached its limit
- needs to be walked on connection destruction for connections that
  have open expectations

This is obviously not good, especially when considering helpers like
H.323 that register *lots* of expectations and can set up permanent
expectations, but it also allows for an easy DoS against firewalls
using connection tracking helpers.

Use a hashtable for expectations to avoid incurring the search overhead
for every new connection. The default hash size is 1/256 of the conntrack
hash table size, this can be overriden using a module parameter.

This patch only introduces the hash table for expectation lookups and
keeps other users to reduce the noise, the following patches will get
rid of it completely.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-10 22:17:59 -07:00
..
ipv4 [NETFILTER]: nf_nat: move NAT declarations from nf_conntrack_ipv4.h to nf_nat.h 2007-07-10 22:17:16 -07:00
ipv6 [NETFILTER]: nf_conntrack: move extern declaration to header files 2006-12-02 21:31:16 -08:00
nf_conntrack_core.h [NETFILTER]: nf_conntrack: use hashtable for expectations 2007-07-10 22:17:59 -07:00
nf_conntrack_ecache.h [NETFILTER]: nf_conntrack_expect: function naming unification 2007-07-10 22:17:53 -07:00
nf_conntrack_expect.h [NETFILTER]: nf_conntrack: use hashtable for expectations 2007-07-10 22:17:59 -07:00
nf_conntrack_extend.h [NETFILTER]: nf_nat: use extension infrastructure 2007-07-10 22:17:20 -07:00
nf_conntrack_helper.h [NETFILTER]: nf_conntrack: reduce masks to a subset of tuples 2007-07-10 22:17:55 -07:00
nf_conntrack_l3proto.h [NETFILTER]: nf_conntrack: remove old memory allocator of conntrack 2007-07-10 22:17:35 -07:00
nf_conntrack_l4proto.h [NETLINK]: Possible cleanups. 2007-04-26 00:57:41 -07:00
nf_conntrack_tuple.h [NETFILTER]: nf_conntrack: reduce masks to a subset of tuples 2007-07-10 22:17:55 -07:00
nf_conntrack.h [NETFILTER]: nf_conntrack: export hash allocation/destruction functions 2007-07-10 22:17:42 -07:00
nf_nat_core.h [NETFILTER]: nf_nat: move NAT declarations from nf_conntrack_ipv4.h to nf_nat.h 2007-07-10 22:17:16 -07:00
nf_nat_helper.h [NETFILTER]: Add NAT support for nf_conntrack 2006-12-02 22:07:13 -08:00
nf_nat_protocol.h [NETFILTER]: Add NAT support for nf_conntrack 2006-12-02 22:07:13 -08:00
nf_nat_rule.h [NETFILTER]: nf_nat: remove unused argument of function allocating binding 2007-05-10 23:47:44 -07:00
nf_nat.h [NETFILTER]: nf_nat: use hlists for bysource hash 2007-07-10 22:17:43 -07:00