From f32f1541936b29e52c1a40e90a4af359f41bb9a4 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Tue, 2 Apr 2019 17:59:28 +0200 Subject: [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 --- hicn-plugin/src/faces/ip/face_ip_cli.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hicn-plugin') 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'", -- cgit 1.2.3-korg