]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: fix multiplicative hashing in sh/dh/lblc/lblcr algorithms
authorVincent Bernat <vincent@bernat.im>
Sun, 1 Apr 2018 10:27:11 +0000 (12:27 +0200)
committerSimon Horman <horms@verge.net.au>
Mon, 9 Apr 2018 07:15:27 +0000 (10:15 +0300)
commit9819c9b08e24d43419d7e2d7bfaf89c60d0d55b2
treed3038013b241a1ee394aacb1ff7214e8b448b8bb
parent02c51522749215186ebfe1bbbb8ec34c8c41c84d
ipvs: fix multiplicative hashing in sh/dh/lblc/lblcr algorithms

The sh/dh/lblc/lblcr algorithms are using Knuth's multiplicative
hashing incorrectly. Replace its use by the hash_32() macro, which
correctly implements this algorithm. It doesn't use the same constant,
but it shouldn't matter.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_dh.c
net/netfilter/ipvs/ip_vs_lblc.c
net/netfilter/ipvs/ip_vs_lblcr.c
net/netfilter/ipvs/ip_vs_sh.c