aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/cmake/Modules/Packaging.cmake2
-rw-r--r--hicn-plugin/src/faces/ip/face_ip_cli.c11
-rw-r--r--hicn-plugin/src/hicn_api.c8
3 files changed, 11 insertions, 10 deletions
diff --git a/hicn-plugin/cmake/Modules/Packaging.cmake b/hicn-plugin/cmake/Modules/Packaging.cmake
index 98996981f..00ac3422f 100644
--- a/hicn-plugin/cmake/Modules/Packaging.cmake
+++ b/hicn-plugin/cmake/Modules/Packaging.cmake
@@ -21,7 +21,7 @@ set(${HICN_PLUGIN}_DESCRIPTION
)
set(${HICN_PLUGIN}_DEB_DEPENDENCIES
- "vpp (>= stable_version-release), vpp (< next_version-release), vpp-plugins (>= stable_version-release), vpp-plugins (< next_version-release)"
+ "vpp (>= stable_version-release), vpp (<< next_version-release), vpp-plugins (>= stable_version-release), vpp-plugins (<< next_version-release)"
CACHE STRING "Dependencies for deb/rpm package."
)
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'",
diff --git a/hicn-plugin/src/hicn_api.c b/hicn-plugin/src/hicn_api.c
index a97796252..661b56d5e 100644
--- a/hicn-plugin/src/hicn_api.c
+++ b/hicn-plugin/src/hicn_api.c
@@ -191,7 +191,7 @@ static void
vl_api_hicn_api_face_ip_add_t_handler (vl_api_hicn_api_face_ip_add_t * mp)
{
vl_api_hicn_api_face_ip_add_reply_t *rmp;
- int rv = HICN_ERROR_UNSPECIFIED;
+ hicn_error_t rv = HICN_ERROR_NONE;
hicn_main_t *sm = &hicn_main;
vnet_main_t *vnm = vnet_get_main ();
@@ -212,12 +212,12 @@ vl_api_hicn_api_face_ip_add_t_handler (vl_api_hicn_api_face_ip_add_t * mp)
if (ip46_address_is_zero (&local_addr))
{
- if (vnet_sw_interface_is_valid (vnm, sw_if))
+ if (!vnet_sw_interface_is_valid (vnm, sw_if))
{
- rv = HICN_ERROR_NONE;
+ rv = HICN_ERROR_UNSPECIFIED;
}
- if (rv == HICN_ERROR_NONE && ip46_address_is_ip4 (&remote_addr))
+ if ((rv == HICN_ERROR_NONE) && ip46_address_is_ip4 (&remote_addr))
{
ip_interface_address_t *interface_address;
ip4_address_t *addr =