ipv4: Use universal hash for ARP.

We need to make sure the multiplier is odd.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2011-07-11 01:37:28 -07:00
parent cd0893369c
commit f610b74b14
3 changed files with 9 additions and 2 deletions

View File

@@ -334,6 +334,7 @@ static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift)
ret->hash_buckets = buckets;
ret->hash_shift = shift;
get_random_bytes(&ret->hash_rnd, sizeof(ret->hash_rnd));
ret->hash_rnd |= 1;
return ret;
}