From 35cf8aa93bfb8414ae58bfcb1d668b2c374ff583 Mon Sep 17 00:00:00 2001 From: Filip Varga Date: Thu, 31 Mar 2022 16:12:44 +0200 Subject: nat: nat44 cli bug fix Two similar CLI paths "nat44" and "nat44 add interface address" caused unexpected behavior. If "nat44 add interface address" command would fail the vlib cli processing function would call "nat44" handler. This would also clean any previously set errors from the first command and basically return same error returned by "nat44" handler for every failed command that starts with the same path string. Fixes nat44-ed and nat44-ei plugin. Change-Id: I1aac85c8ae2932da582a2b78243521d1bf8a0653 Ticket: VPP-2021 Type: fix Signed-off-by: Filip Varga --- src/plugins/nat/nat44-ei/nat44_ei_cli.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/plugins/nat/nat44-ei') diff --git a/src/plugins/nat/nat44-ei/nat44_ei_cli.c b/src/plugins/nat/nat44-ei/nat44_ei_cli.c index e30fce04122..2fe01b07c9e 100644 --- a/src/plugins/nat/nat44-ei/nat44_ei_cli.c +++ b/src/plugins/nat/nat44-ei/nat44_ei_cli.c @@ -1589,23 +1589,23 @@ nat_show_timeouts_command_fn (vlib_main_t *vm, unformat_input_t *input, * @cliexstart{nat44 ei} * Enable nat44 ei plugin * To enable nat44-ei, use: - * vpp# nat44 ei enable + * vpp# nat44 ei plugin enable * To disable nat44-ei, use: - * vpp# nat44 ei disable + * vpp# nat44 ei plugin disable * To enable nat44 ei static mapping only, use: - * vpp# nat44 ei enable static-mapping + * vpp# nat44 ei plugin enable static-mapping * To enable nat44 ei static mapping with connection tracking, use: - * vpp# nat44 ei enable static-mapping connection-tracking + * vpp# nat44 ei plugin enable static-mapping connection-tracking * To enable nat44 ei out2in dpo, use: - * vpp# nat44 ei enable out2in-dpo + * vpp# nat44 ei plugin enable out2in-dpo * To set inside-vrf outside-vrf, use: - * vpp# nat44 ei enable inside-vrf outside-vrf + * vpp# nat44 ei plugin enable inside-vrf outside-vrf * @cliexend ?*/ VLIB_CLI_COMMAND (nat44_ei_enable_disable_command, static) = { - .path = "nat44 ei", + .path = "nat44 ei plugin", .short_help = - "nat44 ei ] [users ] " + "nat44 ei plugin ] [users ] " "[static-mappig-only [connection-tracking]|out2in-dpo] [inside-vrf " "] [outside-vrf ] [user-sessions ]>|disable", .function = nat44_ei_enable_disable_command_fn, -- cgit 1.2.3-korg