hindex: Fix incomplete iteration bug.
authorZhengLingyun <konghuarukhr@163.com>
Mon, 15 Jul 2013 00:21:04 +0000 (08:21 +0800)
committerBen Pfaff <blp@nicira.com>
Tue, 16 Jul 2013 16:58:50 +0000 (09:58 -0700)
commit30cc7d2969aa5397328a49a7d85196a4afdc7f8b
treed1787f2aba1c7f147a9e77570b62235b9cc0ccf0
parentfb93e9aa6ce38fcf85aa997a430115b5b3247af4
hindex: Fix incomplete iteration bug.

hindex_next() make the completely wrong assumption that head nodes within
a bucket were sorted in ascending order by hash.  This commit removes
that assumption.

Also add a test that would have found the problem.

Signed-off-by: ZhengLingyun <konghuarukhr@163.com>
[blp@nicira.com changed how hindex_head_node() is implemented and
 other code details]
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/hindex.c
tests/test-hindex.c