From ea8adf76375389e4c46c1a2eb903743142e44a8d Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 13 Aug 2021 08:10:59 +0000 Subject: ip-neighbor: Handle local MAC address change for incomplete adjacencies Type: fix When the local MAC address of an interface changes the rewrite strings of all adjacency types need to be updated - this patch fixes the missing case of incomplete adjacencies. I moved the update of all adj types into the adj module, since if the complete adjs were done by the ip-neighbour module and incomplete ones by adj module, that would mean two walks of the adj DB, as it is not possible to walk only a specific type. UT is updated to include the missing case. Signed-off-by: Neale Ranns Signed-off-by: Ivan Shvedunov Change-Id: I36af94976c645bdd0d4d3bc0093b24d7d077e9d7 --- src/vnet/ethernet/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/ethernet/interface.c') diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c index f72b4930049..d287748c0e6 100644 --- a/src/vnet/ethernet/interface.c +++ b/src/vnet/ethernet/interface.c @@ -216,6 +216,7 @@ ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai) adj_glean_update_rewrite (ai); break; case IP_LOOKUP_NEXT_ARP: + case IP_LOOKUP_NEXT_REWRITE: ip_neighbor_update (vnm, ai); break; case IP_LOOKUP_NEXT_BCAST: @@ -257,7 +258,6 @@ ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai) case IP_LOOKUP_NEXT_DROP: case IP_LOOKUP_NEXT_PUNT: case IP_LOOKUP_NEXT_LOCAL: - case IP_LOOKUP_NEXT_REWRITE: case IP_LOOKUP_NEXT_MCAST_MIDCHAIN: case IP_LOOKUP_NEXT_MIDCHAIN: case IP_LOOKUP_NEXT_ICMP_ERROR: -- cgit 1.2.3-korg