aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-09-08 16:22:38 -0400
committerDave Barach <openvpp@barachs.net>2017-09-11 19:15:11 +0000
commit2d3dbc45d633c5c2cb1bc4e1f544491e3173f001 (patch)
tree78ed195c84cb00e98b25bfa776bdc0aef89a5e6d /src/vnet
parenteb1ac1732f15f9a99edbeffeb94c525b9ff25c1d (diff)
arp/glean: fix hash computation
Change-Id: Ifef8a9328bb865f6ddb041bafe3699153f89755a Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rwxr-xr-xsrc/vnet/ip/ip4_forward.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index ec4287bb008..b3de1201abc 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2032,11 +2032,12 @@ ip4_arp_inline (vlib_main_t * vm,
}
b0 ^= sw_if_index0;
+ hash_v3_mix32 (a0, b0, c0);
hash_v3_finalize32 (a0, b0, c0);
c0 &= BITS (hash_bitmap) - 1;
- c0 = c0 / BITS (uword);
m0 = (uword) 1 << (c0 % BITS (uword));
+ c0 = c0 / BITS (uword);
bm0 = hash_bitmap[c0];
drop0 = (bm0 & m0) != 0;