summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2020-09-03 11:37:56 +0200
committerDamjan Marion <dmarion@me.com>2020-09-05 08:43:44 +0000
commit4b2946a884c1ffbce022c8121c6889ff39f242e1 (patch)
tree05477d4aa5f857f2c6e5c4459e792863c250fe9e /src/vlib
parent24179ee1a4ba79a43e30c63f0fe061d9d919181c (diff)
vlib: vlib_get_node_by_name fails via API
Type: fix Calling vlib_get_node_by_name via the VPE api doesn't work due to hash weirdness. Haven't gotten around the real cause of this. But this fixes it. Change-Id: I89f95dba2bcd9573b8f1f435e063e9dd57f9ca93 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/node.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vlib/node.c b/src/vlib/node.c
index ab3574bd9a3..119b4718090 100644
--- a/src/vlib/node.c
+++ b/src/vlib/node.c
@@ -47,8 +47,7 @@ vlib_get_node_by_name (vlib_main_t * vm, u8 * name)
vlib_node_main_t *nm = &vm->node_main;
uword *p;
u8 *key = name;
- if (!clib_mem_is_heap_object (vec_header (key, 0)))
- key = format (0, "%s", key);
+ key = format (0, "%s", key);
p = hash_get (nm->node_by_name, key);
if (key != name)
vec_free (key);