From: Andrew Yourtchenko Date: Tue, 16 Oct 2018 15:18:26 +0000 (+0200) Subject: acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each... X-Git-Tag: v19.04-rc0~605 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=ad65f88c51379c24580c3a986be806a5091c5396;p=vpp.git acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each collision in split_partition() (VPP-1458) A pointer to hash-ready ACL rules is only set once, which might cause a crash if there are colliding entries from more than one ACL applied. Solution: reload the pointer based on the element being processed. Change-Id: I7a701c2c3b4236d67293159f2a33c4f967168953 Signed-off-by: Andrew Yourtchenko (cherry picked from commit 84112dd4f98e5a31a8c7340a741f89e77fd03363) --- diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c index c37aae44a98..0087a5e2ab7 100644 --- a/src/plugins/acl/hash_lookup.c +++ b/src/plugins/acl/hash_lookup.c @@ -1487,6 +1487,8 @@ split_partition(acl_main_t *am, u32 first_index, int i=0; u64 collisions = vec_len(pae->colliding_rules); for(i=0; ihash_acl_infos, pae->acl_index); DBG( "TM-collision: base_ace:%d (ace_mask:%d, first_collision_mask:%d)", pae->ace_index, pae->mask_type_index, coll_mask_type_index);