From 987abe9eeb65a3950401073c770012a7898593b7 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 27 Sep 2017 13:50:31 +0200 Subject: acl-plugin: take 2 at VPP-991 fix, this time with a test case which verifies it. The replacement of [] with pool_elt_at_index and subsequent fixing it was incorrect - it was equivalent to &[], since it returns a pointer to the element. I've added VPP-993 previously to create a testcase, so this commit partially fulfills that one as well. Change-Id: I5b15e3ce48316f0429232aacf885e8f7c63d9522 Signed-off-by: Andrew Yourtchenko --- src/plugins/acl/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c index 9e029e62e46..efd506de805 100644 --- a/src/plugins/acl/acl.c +++ b/src/plugins/acl/acl.c @@ -259,13 +259,13 @@ acl_del_list (u32 acl_list_index) } if (acl_list_index < vec_len(am->input_sw_if_index_vec_by_acl)) { - if (vec_len(vec_elt_at_index(am->input_sw_if_index_vec_by_acl, acl_list_index)) > 0) { + if (vec_len(vec_elt(am->input_sw_if_index_vec_by_acl, acl_list_index)) > 0) { /* ACL is applied somewhere inbound. Refuse to delete */ return -1; } } if (acl_list_index < vec_len(am->output_sw_if_index_vec_by_acl)) { - if (vec_len(vec_elt_at_index(am->output_sw_if_index_vec_by_acl, acl_list_index)) > 0) { + if (vec_len(vec_elt(am->output_sw_if_index_vec_by_acl, acl_list_index)) > 0) { /* ACL is applied somewhere outbound. Refuse to delete */ return -1; } -- cgit 1.2.3-korg