- && !vnet_get_sw_interface_safe (vnet_get_main (), a->sw_if_index))
- return clib_error_return_code (0, VNET_API_ERROR_INVALID_SW_IF_INDEX,
- 0, "sw_if_index %u doesn't exist",
- a->sw_if_index);
+ && !vnet_get_sw_interface_or_null (vnet_get_main (),
+ a->sw_if_index))
+ return VNET_API_ERROR_INVALID_SW_IF_INDEX;
+