From b736dc1876d1b50510e3093b3d22a56093036db9 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Tue, 20 Jun 2017 14:40:44 +0200 Subject: acl-plugin: vat: acl_interface_list_dump confusing/incorrect output in case n_input == 0 The logic to print the line " output " is wrong for the case of n_input == 0, and the applied ACLs are printed as if they were applied on input. One may still figure out the truth by looking at the n_input value above, but it is confusing. Change-Id: I7b4a4d548e569994678dd1e139eb829456548b88 Signed-off-by: Andrew Yourtchenko --- src/plugins/acl/acl_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/acl/acl_test.c') diff --git a/src/plugins/acl/acl_test.c b/src/plugins/acl/acl_test.c index 65ef8009955..704906a9e4e 100644 --- a/src/plugins/acl/acl_test.c +++ b/src/plugins/acl/acl_test.c @@ -144,9 +144,9 @@ static void vl_api_acl_interface_list_details_t_handler out = format(out, "sw_if_index: %d, count: %d, n_input: %d\n", mp->sw_if_index, mp->count, mp->n_input); out = format(out, " input "); for(i=0; icount; i++) { - out = format(out, "%d ", ntohl (mp->acls[i])); - if (i == mp->n_input-1) + if (i == mp->n_input) out = format(out, "\n output "); + out = format(out, "%d ", ntohl (mp->acls[i])); } out = format(out, "\n"); clib_warning("%s", out); -- cgit 1.2.3-korg