X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Facl%2Fhash_lookup.c;h=c37aae44a98827fcdb3a5448f67723189fc5a073;hb=6f40a8a4c5792c5c5e5c77366e98b1f10370d685;hp=f2913a933d003b4eb289cc1aa79a647c95d9cbe0;hpb=a44d6b133bfb7ee0fb11d6ae8d9f0f00e57f242c;p=vpp.git diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c index f2913a933d0..c37aae44a98 100644 --- a/src/plugins/acl/hash_lookup.c +++ b/src/plugins/acl/hash_lookup.c @@ -734,12 +734,16 @@ hash_acl_apply(acl_main_t *am, u32 lc_index, int acl_index, u32 acl_position) * ACL, so the change adding this code also takes care of that. */ - /* expand the applied aces vector by the necessary amount */ - vec_resize((*applied_hash_aces), vec_len(ha->rules)); vec_validate(am->hash_applied_mask_info_vec_by_lc_index, lc_index); /* add the rules from the ACL to the hash table for lookup and append to the vector*/ for(i=0; i < vec_len(ha->rules); i++) { + /* + * Expand the applied aces vector to fit a new entry. + * One by one not to upset split_partition() if it is called. + */ + vec_resize((*applied_hash_aces), 1); + int is_ip6 = ha->rules[i].match.pkt.is_ip6; u32 new_index = base_offset + i; applied_hash_ace_entry_t *pae = vec_elt_at_index((*applied_hash_aces), new_index);