Skip to content

Commit

Permalink
Allow NO_SUCH_ENTRY to count as successful 'removal' of neighbors. Wh…
Browse files Browse the repository at this point in the history
…en an address is removed, VPP will invalidate the neighbor cache. This change allows the subsequent gratutious neigh deletion from Linux to be harmless.
  • Loading branch information
pimvanpelt committed Aug 23, 2021
1 parent 87742b4 commit d63fbd8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lcpng_nl_sync.c
Expand Up @@ -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);
}
}

0 comments on commit d63fbd8

Please sign in to comment.