ipv6: Use universal hash for NDISC.

In order to perform a proper universal hash on a vector of integers,
we have to use different universal hashes on each vector element.

Which means we need 4 different hash randoms for ipv6.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2011-12-28 15:06:58 -05:00
parent 32288eb4d9
commit 2c2aba6c56
7 changed files with 32 additions and 21 deletions

View File

@@ -88,9 +88,9 @@ static const struct neigh_ops dn_phase3_ops = {
static u32 dn_neigh_hash(const void *pkey,
const struct net_device *dev,
__u32 hash_rnd)
__u32 *hash_rnd)
{
return jhash_2words(*(__u16 *)pkey, 0, hash_rnd);
return jhash_2words(*(__u16 *)pkey, 0, hash_rnd[0]);
}
struct neigh_table dn_neigh_table = {