multipath: Fix off-by-one in hash_threshold multipath calculation.
authorBen Pfaff <blp@nicira.com>
Sat, 22 Jan 2011 01:09:21 +0000 (17:09 -0800)
committerBen Pfaff <blp@nicira.com>
Sat, 22 Jan 2011 01:09:21 +0000 (17:09 -0800)
commitd7bf2b001f07e63054bbc0d58fe64ce47bc3ab21
tree877b924c71c57ce5b9aba58a65331f8413769ef6
parent1dfee98d87605bc52ed58738edf01e201b189615
multipath: Fix off-by-one in hash_threshold multipath calculation.

0xffffffff / (0xffffffff / n) can have a value as large as n (consider the
n == 1 case), but we need a value no bigger than n-1.  So add 1 before
dividing to fix the problem.

This caused a test failure on Debian "lenny" amd64 when apparently
unrelated code changed.

Reported-by: Justin Pettit <jpettit@nicira.com>
lib/multipath.c