summaryrefslogtreecommitdiff
path: root/include/linux/jhash.h
AgeCommit message (Collapse)Author
2010-12-09The new jhash implementationJozsef Kadlecsik
The current jhash.h implements the lookup2() hash function by Bob Jenkins. However, lookup2() is outdated as Bob wrote a new hash function called lookup3(). The patch replaces the lookup2() implementation of the 'jhash*' functions with that of lookup3(). You can read a longer comparison of the two and other hash functions at http://burtleburtle.net/bob/hash/doobs.html. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-18Fix spelling mistake in jhashAnton Blanchard
Fix a spelling mistake. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-25[JHASH]: Use const in jhash2Patrick McHardy
Use const to avoid forcing users to cast const data. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-02-25[JHASH]: Make key arg const in jhash().Simon Horman
2003-05-02[NET]: Cosmetic cleanups of jhash code.James Morris
- Consistent naming (i.e. jhash_xxx) - Reduces the 2&1 word variants to call jhash_3words() - Replaces __inline__ with inline.
2003-05-02[NET]: Fix hashing exploits in ipv4 routing, IP conntrack, and TCP synq.David S. Miller
Several hash table implementations in the networking were remotely exploitable. Remote attackers could launch attacks whereby, using carefully choosen forged source addresses, make every routing cache entry get hashed into the same hash chain. Netfilter's IP conntrack module and the TCP syn-queue implementation had identical vulnerabilities and have been fixed too. The choosen solution to the problem involved using Bob's Jenkins hash along with a randomly choosen input. For the ipv4 routing cache we take things one step further and periodically choose a new random secret. By default this happens every 10 minutes, but this is configurable by the user via sysctl knobs.