summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2017-07-03 16:25:37 +0200
committerNeale Ranns <nranns@cisco.com>2017-07-04 07:30:26 +0000
commitbe055bd719559fc79d8a4c06479497c4c0bfae93 (patch)
treeec73546a39371553110e837055e0fd40418ac820 /src
parent860af5ad2b023f9c57d622a7a9d3bd0099e480b1 (diff)
acl-plugin: fix acl plugin test failing sporadically (VPP-898)
The "acl_plugin" tests has one of the tests sporadically fail with the following traceback: r.reply.decode().rstrip('\x00') UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 20666: ordinal not in range(128) This occurs in the newly added "show acl-plugin table" debug CLI. This CLI has only the numeric outputs, so the conclusion is that it is the incorrect termination (trailing zero) that might be most probably causing it. The other acl-plugins show commands also lack the zero-termination termination, so fix all of them. The particularity of this command vs. the other acl-plugin debug CLIs is that the accumulator is freed and allocated multiple times, this might explain the issue is not seen with them. Change-Id: I87b5c0d6152fbebcae9c7d0ce97155c1ae6666db Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/acl/acl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index 704a839c363..02fcb4fe5d9 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -1974,6 +1974,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm,
#define _(cnt, desc) out0 = format(out0, " %20lu: %s\n", am->cnt, desc);
foreach_fa_cleaner_counter;
#undef _
+ vec_terminate_c_string(out0);
vlib_cli_output(vm, "\n\n%s\n\n", out0);
vlib_cli_output(vm, "Sessions per interval: min %lu max %lu increment: %f ms current: %f ms",
am->fa_min_deleted_sessions_per_interval, am->fa_max_deleted_sessions_per_interval,
@@ -2011,6 +2012,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm,
}
}
+ vec_terminate_c_string(out0);
vlib_cli_output(vm, "\n%s\n", out0);
vec_free(out0);
}
@@ -2067,6 +2069,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm,
out0 = format(out0, "\n");
}
}
+ vec_terminate_c_string(out0);
vlib_cli_output(vm, "\n%s\n", out0);
vec_free(out0);
}
@@ -2138,6 +2141,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm,
pa->src_portrange_not_powerof2, pa->dst_portrange_not_powerof2);
}
}
+ vec_terminate_c_string(out0);
vlib_cli_output(vm, "\n%s\n", out0);
vec_free(out0);
}
@@ -2184,6 +2188,7 @@ acl_show_aclplugin_fn (vlib_main_t * vm,
}
}
+ vec_terminate_c_string(out0);
vlib_cli_output(vm, "\n%s\n", out0);
vec_free(out0);
}