summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/ip/face_ip.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-08-01 15:55:58 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-08-01 15:55:58 +0200
commit7b373ed0c6d287aa61c65be2ddc7da1817e1757a (patch)
tree433f9d367290e4cd932040c5fe86e41f2f5c6da1 /hicn-plugin/src/faces/ip/face_ip.c
parent0a1c6b5565e20167d1f1f33a5a8b597f420b18b0 (diff)
[HICN-255] the api vnet_get_sw_interface_safe is now vnet_get_sw_interface_or_null
Change-Id: I080e7e216b779ce8beb292edadff0cc6c468549b Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/ip/face_ip.c')
-rw-r--r--hicn-plugin/src/faces/ip/face_ip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hicn-plugin/src/faces/ip/face_ip.c b/hicn-plugin/src/faces/ip/face_ip.c
index d03ff8739..6e279583c 100644
--- a/hicn-plugin/src/faces/ip/face_ip.c
+++ b/hicn-plugin/src/faces/ip/face_ip.c
@@ -140,7 +140,7 @@ hicn_face_ip_add (const ip46_address_t * local_addr,
fib_prefix_t fib_pfx;
fib_node_index_t fib_entry_index;
fib_prefix_from_ip46_addr (remote_addr, &fib_pfx);
- fib_pfx.fp_len = 128;
+ fib_pfx.fp_len = ip46_address_is_ip4(remote_addr)? 32 : 128;
u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto,
HICN_FIB_TABLE,
@@ -287,7 +287,7 @@ format_hicn_face_ip (u8 * s, va_list * args)
s = format (s, "%U", format_vnet_link, adj->ia_link);
vnet_sw_interface_t *sw_int =
- vnet_get_sw_interface_safe (vnm, face->shared.sw_if);
+ vnet_get_sw_interface_or_null (vnm, face->shared.sw_if);
if (sw_int != NULL)
s = format (s, " dev %U", format_vnet_sw_interface_name, vnm, sw_int);
@@ -309,7 +309,7 @@ format_hicn_face_ip (u8 * s, va_list * args)
format_ip46_address, &ip_face->remote_addr, IP46_TYPE_ANY);
vnet_sw_interface_t *sw_int =
- vnet_get_sw_interface_safe (vnm, face->shared.sw_if);
+ vnet_get_sw_interface_or_null (vnm, face->shared.sw_if);
if (sw_int != NULL)
s = format (s, " dev %U", format_vnet_sw_interface_name, vnm, sw_int);