IPv6 NS RS tests and fixes
includes Fix for VPP-584 with API change to remove prefix length from LL programming
Change-Id: If860751c35e60255fb977f73bc33e8c2649e728e
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index b84d151..ab808df 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -53,6 +53,14 @@
}
always_inline vnet_sw_interface_t *
+vnet_get_sw_interface_safe (vnet_main_t * vnm, u32 sw_if_index)
+{
+ if (!pool_is_free_index (vnm->interface_main.sw_interfaces, sw_if_index))
+ return pool_elt_at_index (vnm->interface_main.sw_interfaces, sw_if_index);
+ return (NULL);
+}
+
+always_inline vnet_sw_interface_t *
vnet_get_hw_sw_interface (vnet_main_t * vnm, u32 hw_if_index)
{
vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, hw_if_index);