arp/glean: fix hash computation 67/8367/2
authorFlorin Coras <fcoras@cisco.com>
Fri, 8 Sep 2017 20:22:38 +0000 (16:22 -0400)
committerDave Barach <openvpp@barachs.net>
Mon, 11 Sep 2017 19:15:11 +0000 (19:15 +0000)
Change-Id: Ifef8a9328bb865f6ddb041bafe3699153f89755a
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/ip/ip4_forward.c

index ec4287b..b3de120 100755 (executable)
@@ -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;