diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-04-02 17:59:28 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-04-02 17:59:28 +0200 |
commit | f32f1541936b29e52c1a40e90a4af359f41bb9a4 (patch) | |
tree | daed085de3d76b9a2138c5838bef8ac6e4f368ee /hicn-plugin | |
parent | 3cc0a6bbae4fd3dadb65a0e9789b48e2cea9d303 (diff) |
[HICN-160] Bug in the command parsing that prevented to correctly parse the command hicn face ip add
Change-Id: I606fcc8c777124879659623749eb049c9e3929f9
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin')
-rw-r--r-- | hicn-plugin/src/faces/ip/face_ip_cli.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hicn-plugin/src/faces/ip/face_ip_cli.c b/hicn-plugin/src/faces/ip/face_ip_cli.c index 58cf8d562..760768be1 100644 --- a/hicn-plugin/src/faces/ip/face_ip_cli.c +++ b/hicn-plugin/src/faces/ip/face_ip_cli.c @@ -60,12 +60,13 @@ hicn_face_ip_cli_set_command_fn (vlib_main_t * vm, else if (unformat (line_input, "add")) { face_op = HICN_FACE_ADD; - if (unformat (line_input, "local %U ", + if (unformat (line_input, "local %U", unformat_ip46_address, &local_addr, IP46_TYPE_ANY)); - else if (unformat (line_input, "remote %U intfc %U", - unformat_ip46_address, &remote_addr, - IP46_TYPE_ANY, unformat_vnet_sw_interface, vnm, - &sw_if)); + + if (unformat (line_input, "remote %U intfc %U", + unformat_ip46_address, &remote_addr, + IP46_TYPE_ANY, unformat_vnet_sw_interface, vnm, + &sw_if)); else { return clib_error_return (0, "%s '%U'", |