aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-23 17:36:56 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-03-23 18:40:16 +0000
commitf87acfaf739f7b6361d6299549a897b03b0cc8c6 (patch)
tree6107b984b0a4ae9b6365eb08e307b377b4266ba5 /src/plugins/nat
parentba465b970e88d02467838bd9c272cb6d5cd653ec (diff)
vppinfra: change vlib_register_node so it takes format string for node name
This allows specifying both c string and vector for node name and removes need for crafting temporary string. Type: improvement Change-Id: I0b016cd70aeda0f68eb6f9171c5152f303be7369 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/pnat/tests/pnat_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/nat/pnat/tests/pnat_test.c b/src/plugins/nat/pnat/tests/pnat_test.c
index e7d946941b9..f6579dc5ca9 100644
--- a/src/plugins/nat/pnat/tests/pnat_test.c
+++ b/src/plugins/nat/pnat/tests/pnat_test.c
@@ -569,7 +569,8 @@ int main(int argc, char **argv) {
ip_checksum_init(vm);
- u32 node_index = vlib_register_node(vm, &pnat_input_node);
+ u32 node_index =
+ vlib_register_node(vm, &pnat_input_node, "%s", pnat_input_node.name);
node = vlib_node_get_runtime(vm, node_index);
assert(node);