linux/include/net/netns
Patrick McHardy d696c7bdaa netfilter: nf_conntrack: fix hash resizing with namespaces
As noticed by Jon Masters <jonathan@jonmasters.org>, the conntrack hash
size is global and not per namespace, but modifiable at runtime through
/sys/module/nf_conntrack/hashsize. Changing the hash size will only
resize the hash in the current namespace however, so other namespaces
will use an invalid hash size. This can cause crashes when enlarging
the hashsize, or false negative lookups when shrinking it.

Move the hash size into the per-namespace data and only use the global
hash size to initialize the per-namespace value when instanciating a
new namespace. Additionally restrict hash resizing to init_net for
now as other namespaces are not handled currently.

Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-08 11:18:07 -08:00
..
conntrack.h netfilter: nf_conntrack: fix hash resizing with namespaces 2010-02-08 11:18:07 -08:00
core.h [SOCK][NETNS]: Add the percpu prot_inuse counter in the struct net. 2008-03-31 19:42:16 -07:00
dccp.h [NETNS][DCCPV6]: Move the dccp_v6_ctl_sk on the struct net. 2008-04-13 22:32:25 -07:00
generic.h net: remove [un]register_pernet_gen_... and update the docs. 2009-12-01 16:16:00 -08:00
hash.h netns: introduce the net_hash_mix "salt" for hashes 2008-06-16 17:14:11 -07:00
ipv4.h netfilter: nf_conntrack: fix hash resizing with namespaces 2010-02-08 11:18:07 -08:00
ipv6.h netns: embed ip6_dst_ops directly 2009-09-01 17:40:31 -07:00
mib.h netns xfrm: per-netns MIBs 2008-11-25 17:59:52 -08:00
packet.h [NETNS]: separate af_packet netns data 2008-01-28 14:57:15 -08:00
unix.h
x_tables.h net, netns_xt: shrink netns_xt members 2009-07-05 19:16:18 -07:00
xfrm.h netns xfrm: deal with dst entries in netns 2010-01-24 22:47:53 -08:00