Skip to content

Commit

Permalink
fib: Adjacency realloc during rewrite update walk (VPP-1822)
Browse files Browse the repository at this point in the history
Type: fix

Change-Id: I0e826284c50713d322ee7943d87fd3363cfbdfbc
Signed-off-by: Neale Ranns <[email protected]>
  • Loading branch information
Neale Ranns committed Jan 22, 2020
1 parent 257749c commit 418b225
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vnet/adj/adj_nbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ 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;

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)
{
/*
Expand Down Expand Up @@ -396,7 +396,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);

/*
Expand Down Expand Up @@ -510,7 +510,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);
}

Expand Down

0 comments on commit 418b225

Please sign in to comment.