summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-07-31 09:05:37 -0400
committerNeale Ranns <nranns@cisco.com>2019-07-31 14:30:12 +0000
commitbaba24e13642cd81f74b68c82b88eb7e57b6a676 (patch)
tree1296bdfcdb8745795a2187743d8beede5739da06 /src/vlib
parent25ab6cfed6db18bdd8cdb57b7e751751aa64c576 (diff)
vlib: fix format_error_trace
Error index calculation is error_code + error_node->error_heap_index. Type: fix Fixes: gerrit 20802 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I66cf05a29b3cfd9ef9c5468e399290e862b784af
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/drop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/drop.c b/src/vlib/drop.c
index 034a23fb759..e29195ad15d 100644
--- a/src/vlib/drop.c
+++ b/src/vlib/drop.c
@@ -91,7 +91,8 @@ format_error_trace (u8 * s, va_list * va)
u32 i;
error_node = vlib_get_node (vm, vlib_error_get_node (&vm->node_main, e[0]));
- i = counter_index (vm, vlib_error_get_code (&vm->node_main, e[0]));
+ i = counter_index (vm, vlib_error_get_code (&vm->node_main, e[0])) +
+ error_node->error_heap_index;
s = format (s, "%v: %s", error_node->name, em->error_strings_heap[i]);
return s;