netfilter: save the hash of the tuple in the original direction for latter use
authorChangli Gao <xiaosuo@gmail.com>
Tue, 21 Sep 2010 15:49:20 +0000 (17:49 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 21 Sep 2010 15:49:20 +0000 (17:49 +0200)
commit99f07e91bef34db0fc8b1a224096e97f02dc0d56
tree869d47e97adb3c04b42f38a55836f2518f6221f9
parent8a8030407f55a6aaedb51167c1a2383311fcd707
netfilter: save the hash of the tuple in the original direction for latter use

Since we don't change the tuple in the original direction, we can save it
in ct->tuplehash[IP_CT_DIR_REPLY].hnode.pprev for __nf_conntrack_confirm()
use.

__hash_conntrack() is split into two steps: hash_conntrack_raw() is used
to get the raw hash, and __hash_bucket() is used to get the bucket id.

In SYN-flood case, early_drop() doesn't need to recompute the hash again.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_core.c