aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/acl/hash_lookup.c8
1 files changed, 6 insertions, 2 deletions
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);