diff options
author | Zang MingJie <zealot0630@gmail.com> | 2018-12-24 17:12:19 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-12-24 09:32:15 -0800 |
commit | a2d1a08c8d2efae938683bcbf6b66fba19ace103 (patch) | |
tree | 14548af524cc839fbbc608a3b476c82a1d466b7b | |
parent | 5078ae8bb9cbe5a3d9575be87475ecd0e63ce328 (diff) | |
download | openvswitch-a2d1a08c8d2efae938683bcbf6b66fba19ace103.tar.gz |
cmap: Fix hashing in cmap_find_protected().
cmap_find_protected calculated wrong h2 hash which causing entries with
duplicated id inserted into the cmap.
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/047945.html
Signed-off-by: Zang MingJie <zealot0630@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | lib/cmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cmap.c b/lib/cmap.c index 7a54ea6ab..342531115 100644 --- a/lib/cmap.c +++ b/lib/cmap.c @@ -490,7 +490,7 @@ cmap_find_protected(const struct cmap *cmap, uint32_t hash) { struct cmap_impl *impl = cmap_get_impl(cmap); uint32_t h1 = rehash(impl, hash); - uint32_t h2 = other_hash(hash); + uint32_t h2 = other_hash(h1); struct cmap_node *node; node = cmap_find_bucket_protected(impl, hash, h1); |