summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/dslite
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2021-05-04 16:27:33 +0200
committerOle Tr�an <otroan@employees.org>2021-05-05 13:21:24 +0000
commitae80aba3b070ad12ad4e2d587b6cdf47f0abe6e1 (patch)
treee299e32db8c81bd7deffd01ab716db5aa271a47c /src/plugins/nat/dslite
parent49a2925b1b61bd08770a3c268aacb52fafa5631c (diff)
nat: fixing cfg file parsing cli issues
Type: fix Change-Id: I35012bb2f7af1996c954641af40f3223bc7f37e4 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/dslite')
-rw-r--r--src/plugins/nat/dslite/dslite_cli.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/nat/dslite/dslite_cli.c b/src/plugins/nat/dslite/dslite_cli.c
index 0537957930c..193cb3fe248 100644
--- a/src/plugins/nat/dslite/dslite_cli.c
+++ b/src/plugins/nat/dslite/dslite_cli.c
@@ -14,6 +14,8 @@
*/
#include <nat/dslite/dslite.h>
+#define DSLITE_EXPECTED_ARGUMENT "expected required argument(s)"
+
static clib_error_t *
dslite_add_del_pool_addr_command_fn (vlib_main_t * vm,
unformat_input_t * input,
@@ -29,7 +31,7 @@ dslite_add_del_pool_addr_command_fn (vlib_main_t * vm,
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, DSLITE_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
@@ -115,7 +117,7 @@ dslite_set_aftr_tunnel_addr_command_fn (vlib_main_t * vm,
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, DSLITE_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
@@ -166,7 +168,7 @@ dslite_set_b4_tunnel_addr_command_fn (vlib_main_t * vm,
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, DSLITE_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{