Type: fix
Details:
I have the situation that ip_neighbor_learn is called for an already deleted interface.
The reproduction sequence is following
1. arp_input -> arp_reply on some worker
2. call ip_neighbor_learn_dp , so request to perform ip_neighbor_learn on the vpp_main thread
3. the vpp_main thread is very busy - at the same moment we remove most of l2 interfaces and vrfs under barrier sync, including the TX interface of arp_reply
4. call ip_neighbor_learn in the main thread , when the appropriate interface is already deleted
Change-Id: I69b167ba919d57f19d6b941260243bca889c31c1
Signed-off-by: Anna Neiman <[email protected]>
}
else
{
+ if (INDEX_INVALID == fib_index)
+ return;
fib_protocol_t fproto;
fproto = ip_address_family_to_fib_proto (af);
/* main thread only */
ASSERT (0 == vlib_get_thread_index ());
+ if (!vnet_sw_interface_is_valid (vnet_get_main (), sw_if_index))
+ return 0;
+
fproto = ip_address_family_to_fib_proto (ip_addr_version (ip));
const ip_neighbor_key_t key = {