netfilter: nf_nat: use hash random for bysource hash
authorPatrick McHardy <kaber@trash.net>
Fri, 23 Dec 2011 13:00:13 +0000 (14:00 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 23 Dec 2011 13:36:44 +0000 (14:36 +0100)
commit4d4e61c6ca683cdc0ea07d39c80cc8d6d478b31e
tree6c7431f3649d5cc7bf726dab880f68d6f8a4728b
parentcbc9f2f4fcd70d5a627558ca9a881fa9391abf69
netfilter: nf_nat: use hash random for bysource hash

Use nf_conntrack_hash_rnd in NAT bysource hash to avoid hash chain attacks.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_nat_core.c
net/netfilter/nf_conntrack_core.c