From d8bab19b8dd3229baf0d0b87c68b3a19f2c53bfb Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 17 Oct 2024 10:43:34 +0200 Subject: nat: add clear session for nat44-ed Type: improvement Change-Id: Ie8568999821f6dd5025fd5343670a8969a3e634e Signed-off-by: Ole Troan --- src/plugins/nat/nat44-ed/nat44_ed_cli.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/plugins/nat/nat44-ed/nat44_ed_cli.c') diff --git a/src/plugins/nat/nat44-ed/nat44_ed_cli.c b/src/plugins/nat/nat44-ed/nat44_ed_cli.c index 14313d05a35..fba128208d9 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed_cli.c +++ b/src/plugins/nat/nat44-ed/nat44_ed_cli.c @@ -1842,6 +1842,28 @@ done: return error; } +static clib_error_t * +nat44_ed_clear_sessions_command_fn (vlib_main_t *vm, unformat_input_t *input, + vlib_cli_command_t *cmd) +{ + clib_error_t *error = 0; + nat44_ed_sessions_clear (); + return error; +} + +/*? + * @cliexpar + * @cliexstart{clear nat44 ed sessions} + * To clear all NAT44 sessions + * vpp# clear nat44 ed sessions + * @cliexend +?*/ +VLIB_CLI_COMMAND (nat44_ed_clear_sessions_command, static) = { + .path = "clear nat44 ed sessions", + .short_help = "clear nat44 ed sessions", + .function = nat44_ed_clear_sessions_command_fn, +}; + /*? * @cliexpar * @cliexstart{nat44} -- cgit