diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-04-03 07:18:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-04-03 07:18:10 +0000 |
commit | 693710043ebba18bb6457832127512a64c7b0aa6 (patch) | |
tree | 49d716afe2a77a3210a62b454b2dc0782cc208d9 /hicn-plugin/src/hicn_api.c | |
parent | 08c9da8bd51800cb8c77f2df4cf5576f69e983b6 (diff) | |
parent | ff97fb1605708202b036c2f9ff43cbd367bbe797 (diff) |
Merge "[HICN-161] Fixed bug that prevents to create an ip face when the code is compiled with -O3"
Diffstat (limited to 'hicn-plugin/src/hicn_api.c')
-rw-r--r-- | hicn-plugin/src/hicn_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 = |