From 66300f6ab8da91201e78dcf502b0f6c872e5f23f Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Sun, 12 Jan 2020 21:16:55 +0000 Subject: fib: Adjacency realloc during rewrite update walk (VPP-1822) Type: fix Change-Id: I0e826284c50713d322ee7943d87fd3363cfbdfbc Signed-off-by: Neale Ranns --- src/vnet/adj/adj_nbr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c index f769c56d8ec..9413ae185fb 100644 --- a/src/vnet/adj/adj_nbr.c +++ b/src/vnet/adj/adj_nbr.c @@ -347,7 +347,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, u8 *rewrite) { ip_adjacency_t *walk_adj; - adj_index_t walk_ai; + adj_index_t walk_ai, ai; vlib_main_t * vm; u32 old_next; int do_walk; @@ -355,7 +355,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, vm = vlib_get_main(); old_next = adj->lookup_next_index; - walk_ai = adj_get_index(adj); + ai = walk_ai = adj_get_index(adj); if (VNET_LINK_MPLS == adj->ia_link) { /* @@ -399,7 +399,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, * DPO, this adj will no longer be in use and its lock count will drop to 0. * We don't want it to be deleted as part of this endeavour. */ - adj_lock(adj_get_index(adj)); + adj_lock(ai); adj_lock(walk_ai); /* @@ -514,7 +514,7 @@ adj_nbr_update_rewrite_internal (ip_adjacency_t *adj, walk_adj->ia_flags &= ~ADJ_FLAG_SYNC_WALK_ACTIVE; } - adj_unlock(adj_get_index(adj)); + adj_unlock(ai); adj_unlock(walk_ai); } -- cgit 1.2.3-korg