Allow NO_SUCH_ENTRY to count as successful 'removal' of neighbors. When an address is removed, VPP will invalidate the neighbor cache. This change allows the subsequent gratutious neigh deletion from Linux to be harmless.

This commit is contained in:
Pim van Pelt
2021-08-24 00:52:26 +02:00
parent 87742b4f54
commit d63fbd8a9a

View File

@ -272,16 +272,16 @@ lcp_nl_neigh_del (struct rtnl_neigh *rn)
lcp_nl_mk_ip_addr (rtnl_neigh_get_dst (rn), &nh);
rv = ip_neighbor_del (&nh, lip->lip_phy_sw_if_index);
if (rv)
{
NL_ERROR ("neigh_del: Failed %U iface %U", format_ip_address, &nh,
format_vnet_sw_if_index_name, vnet_get_main (),
lip->lip_phy_sw_if_index);
}
else
if (rv == 0 || rv == VNET_API_ERROR_NO_SUCH_ENTRY)
{
NL_NOTICE ("neigh_del: Deleted %U iface %U", format_ip_address, &nh,
format_vnet_sw_if_index_name, vnet_get_main (),
lip->lip_phy_sw_if_index);
}
else
{
NL_ERROR ("neigh_del: Failed %U iface %U", format_ip_address, &nh,
format_vnet_sw_if_index_name, vnet_get_main (),
lip->lip_phy_sw_if_index);
}
}